directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r289944 - in /directory/apacheds/trunk/core/src/main: java/org/apache/ldap/server/subtree/SubentryService.java schema/apache.schema
Date Sun, 18 Sep 2005 16:35:05 GMT
Author: akarasulu
Date: Sun Sep 18 09:34:56 2005
New Revision: 289944

URL: http://svn.apache.org/viewcvs?rev=289944&view=rev
Log:
Completed DIREVE-255 here:

http://issues.apache.org/jira/browse/DIREVE-255

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/subtree/SubentryService.java
    directory/apacheds/trunk/core/src/main/schema/apache.schema

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/subtree/SubentryService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/subtree/SubentryService.java?rev=289944&r1=289943&r2=289944&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/subtree/SubentryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/subtree/SubentryService.java
Sun Sep 18 09:34:56 2005
@@ -70,10 +70,8 @@
     public static final String AUTONOUMOUS_AREA_SUBENTRY = "autonomousAreaSubentry";
 
     public static final String AC_AREA = "accessControlSpecificArea";
-    public static final String AC_AREA_SUBENTRY = "accessControlAreaSubentries";
-
     public static final String AC_INNERAREA = "accessControlInnerArea";
-    public static final String AC_INNERAREA_SUBENTRY = "accessControlInnerAreaSubentries";
+    public static final String AC_SUBENTRY = "accessControlSubentries";
 
     public static final String SCHEMA_AREA = "subschemaAdminSpecificArea";
     public static final String SCHEMA_AREA_SUBENTRY = "subschemaSubentry";
@@ -85,8 +83,7 @@
 
     public static final String[] SUBENTRY_OPATTRS = {
         AUTONOUMOUS_AREA_SUBENTRY,
-        AC_AREA_SUBENTRY,
-        AC_INNERAREA_SUBENTRY,
+        AC_SUBENTRY,
         SCHEMA_AREA_SUBENTRY,
         COLLECTIVE_ATTRIBUTE_SUBENTRIES
     };
@@ -360,21 +357,12 @@
                                 entry.put( operational );
                             }
                         }
-                        else if ( role.equalsIgnoreCase( AC_AREA ) )
-                        {
-                            operational = ( Attribute ) entry.get( AC_AREA_SUBENTRY ).clone();
-                            if ( operational == null )
-                            {
-                                operational = new LockableAttributeImpl( AC_AREA_SUBENTRY
);
-                                entry.put( operational );
-                            }
-                        }
-                        else if ( role.equalsIgnoreCase( AC_INNERAREA ) )
+                        else if ( role.equalsIgnoreCase( AC_AREA ) || role.equalsIgnoreCase(
AC_INNERAREA ) )
                         {
-                            operational = ( Attribute ) entry.get( AC_INNERAREA_SUBENTRY
).clone();
+                            operational = ( Attribute ) entry.get( AC_SUBENTRY ).clone();
                             if ( operational == null )
                             {
-                                operational = new LockableAttributeImpl( AC_INNERAREA_SUBENTRY
);
+                                operational = new LockableAttributeImpl( AC_SUBENTRY );
                                 entry.put( operational );
                             }
                         }
@@ -965,26 +953,12 @@
                     operational.add( newName.toString() );
                 }
             }
-            else if ( role.equalsIgnoreCase( AC_AREA ) )
+            else if ( role.equalsIgnoreCase( AC_AREA ) || role.equalsIgnoreCase( AC_INNERAREA
) )
             {
-                operational = ( Attribute ) entry.get( AC_AREA_SUBENTRY ).clone();
+                operational = ( Attribute ) entry.get( AC_SUBENTRY ).clone();
                 if ( operational == null )
                 {
-                    operational = new LockableAttributeImpl( AC_AREA_SUBENTRY );
-                    operational.add( newName.toString() );
-                }
-                else
-                {
-                    operational.remove( oldName.toString() );
-                    operational.add( newName.toString() );
-                }
-            }
-            else if ( role.equalsIgnoreCase( AC_INNERAREA ) )
-            {
-                operational = ( Attribute ) entry.get( AC_INNERAREA_SUBENTRY ).clone();
-                if ( operational == null )
-                {
-                    operational = new LockableAttributeImpl( AC_INNERAREA_SUBENTRY );
+                    operational = new LockableAttributeImpl( AC_SUBENTRY );
                     operational.add( newName.toString() );
                 }
                 else
@@ -1068,26 +1042,15 @@
                     operational.get( AUTONOUMOUS_AREA_SUBENTRY ).add( name.toString() );
                 }
             }
-            else if ( role.equalsIgnoreCase( AC_AREA ) )
-            {
-                if ( operational.get( AC_AREA_SUBENTRY ) == null )
-                {
-                    operational.put( AC_AREA_SUBENTRY, name.toString() );
-                }
-                else
-                {
-                    operational.get( AC_AREA_SUBENTRY ).add( name.toString() );
-                }
-            }
-            else if ( role.equalsIgnoreCase( AC_INNERAREA ) )
+            else if ( role.equalsIgnoreCase( AC_AREA ) || role.equalsIgnoreCase( AC_INNERAREA
) )
             {
-                if ( operational.get( AC_INNERAREA_SUBENTRY ) == null )
+                if ( operational.get( AC_SUBENTRY ) == null )
                 {
-                    operational.put( AC_INNERAREA_SUBENTRY, name.toString() );
+                    operational.put( AC_SUBENTRY, name.toString() );
                 }
                 else
                 {
-                    operational.get( AC_INNERAREA_SUBENTRY ).add( name.toString() );
+                    operational.get( AC_SUBENTRY ).add( name.toString() );
                 }
             }
             else if ( role.equalsIgnoreCase( SCHEMA_AREA ) )

Modified: directory/apacheds/trunk/core/src/main/schema/apache.schema
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/schema/apache.schema?rev=289944&r1=289943&r2=289944&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/schema/apache.schema (original)
+++ directory/apacheds/trunk/core/src/main/schema/apache.schema Sun Sep 18 09:34:56 2005
@@ -92,6 +92,15 @@
     NO-USER-MODIFICATION
     USAGE directoryOperation )
 
+attributetype ( 1.2.6.1.4.1.18060.1.1.1.3.26 NAME 'accessControlSubentries'
+    DESC 'Used to track a subentry associated with access control areas'
+    SUP distinguishedName
+    EQUALITY distinguishedNameMatch
+    SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
+    SINGLE-VALUE
+    NO-USER-MODIFICATION
+    USAGE directoryOperation )
+
 objectclass ( 1.2.6.1.4.1.18060.1.1.1.4.1 NAME 'prefNode'
     SUP top
     STRUCTURAL



Mime
View raw message