directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r996505 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
Date Mon, 13 Sep 2010 11:41:00 GMT
Author: elecharny
Date: Mon Sep 13 11:41:00 2010
New Revision: 996505

URL: http://svn.apache.org/viewvc?rev=996505&view=rev
Log:
o Removed the sysout from the code
o Used the DirectoryService to access the AP cache

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java?rev=996505&r1=996504&r2=996505&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
Mon Sep 13 11:41:00 2010
@@ -184,9 +184,6 @@ public class AdministrativePointIntercep
         SPECIFIC_AREA_ROLES.add( SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA_OID );
     }
 
-    private DnNode<List<AdministrativePoint>> adminPointCache;
-
-
     /**
      * Tells if the given role is a InnerArea role
      */
@@ -628,9 +625,7 @@ public class AdministrativePointIntercep
             uuid );
 
         // Store the APs in the AP cache
-        adminPointCache.add( addContext.getDn(), administrativePoints );
-
-        System.out.println( "After addition : " + adminPointCache );
+        directoryService.getAdministrativePoints().add( addContext.getDn(), administrativePoints
);
     }
 
 
@@ -646,7 +641,7 @@ public class AdministrativePointIntercep
 
             String uuid = adminPointEntry.get( ENTRY_UUID_AT ).getString();
 
-            List<AdministrativePoint> currentAdminPoints = adminPointCache.getElement(
dn );
+            List<AdministrativePoint> currentAdminPoints = directoryService.getAdministrativePoints().getElement(
dn );
 
             if ( currentAdminPoints == null )
             {
@@ -661,7 +656,7 @@ public class AdministrativePointIntercep
             }
 
             // Store the APs in the AP cache
-            adminPointCache.add( dn, currentAdminPoints );
+            directoryService.getAdministrativePoints().add( dn, currentAdminPoints );
         }
     }
 
@@ -673,9 +668,7 @@ public class AdministrativePointIntercep
         throws LdapException
     {
         // Store the APs in the AP cache
-        adminPointCache.remove( deleteContext.getDn() );
-
-        System.out.println( "After deletion : " + adminPointCache );
+        directoryService.getAdministrativePoints().remove( deleteContext.getDn() );
     }
 
 
@@ -708,9 +701,6 @@ public class AdministrativePointIntercep
         controls.setReturningAttributes( new String[]
             { SchemaConstants.ADMINISTRATIVE_ROLE_AT } );
 
-        // Create the root AdministrativePoint cache. The first DN
-        adminPointCache = new DnNode<List<AdministrativePoint>>();
-
         // get the list of all the AAPs
         List<Entry> administrativePoints = getAdministrativePoints();
         addAdminPointCache( administrativePoints );



Mime
View raw message