directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235306 [3/3] - in /directory/apacheds/trunk/interceptors: changelog/src/main/java/org/apache/directory/server/core/changelog/ changelog/src/test/java/org/apache/directory/server/core/changelog/ collective/src/main/java/org/apache/director...
Date Tue, 24 Jan 2012 15:43:21 GMT
Modified: directory/apacheds/trunk/interceptors/subtree/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/subtree/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/subtree/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
(original)
+++ directory/apacheds/trunk/interceptors/subtree/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
Tue Jan 24 15:43:19 2012
@@ -73,6 +73,7 @@ public class SubtreeEvaluatorTest
     private static FilterNormalizingVisitor visitor;
     private static ConcreteNameComponentNormalizer ncn;
 
+
     @BeforeClass
     public static void init() throws Exception
     {
@@ -95,13 +96,13 @@ public class SubtreeEvaluatorTest
 
         if ( !loaded )
         {
-            fail( "Schema load failed : " + Exceptions.printErrors(schemaManager.getErrors())
);
+            fail( "Schema load failed : " + Exceptions.printErrors( schemaManager.getErrors()
) );
         }
 
         CacheManager.getInstance().addCacheIfAbsent( "dnCache" );
         Cache dnCache = CacheManager.getInstance().getCache( "dnCache" );
         dnFactory = new DefaultDnFactory( schemaManager, dnCache );
-        
+
         ncn = new ConcreteNameComponentNormalizer( schemaManager );
 
         visitor = new FilterNormalizingVisitor( ncn, schemaManager );

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
Tue Jan 24 15:43:19 2012
@@ -42,8 +42,8 @@ public abstract class AbstractStoredProc
 {
     private OperationContext opContext;
     private Map<Class<?>, MicroInjector> injectors;
-    
-    
+
+
     public AbstractStoredProcedureParameterInjector( OperationContext opContext )
     {
         this.opContext = opContext;
@@ -51,52 +51,51 @@ public abstract class AbstractStoredProc
         injectors.put( StoredProcedureParameter.Generic_OPERATION_PRINCIPAL.class, $operationPrincipalInjector
);
         injectors.put( StoredProcedureParameter.Generic_LDAP_CONTEXT.class, $ldapContextInjector
);
     }
-    
-    
+
+
     protected Dn getOperationPrincipal() throws LdapInvalidDnException
     {
         Principal principal = opContext.getSession().getEffectivePrincipal();
         Dn userName = opContext.getSession().getDirectoryService().getDnFactory().create(
principal.getName() );
         return userName;
     }
-    
-    
+
+
     protected Map<Class<?>, MicroInjector> getInjectors()
     {
         return injectors;
     }
-    
-    
+
+
     public OperationContext getOperationContext()
     {
         return opContext;
     }
-    
-    
+
+
     public void setOperationContext( OperationContext invocation )
     {
         this.opContext = invocation;
     }
-    
-    
-    public final List<Object> getArgumentsToInject( OperationContext opContext, 
+
+
+    public final List<Object> getArgumentsToInject( OperationContext opContext,
         List<StoredProcedureParameter> parameterList ) throws LdapException
     {
         List<Object> arguments = new ArrayList<Object>();
-        
+
         Iterator<StoredProcedureParameter> it = parameterList.iterator();
-        
+
         while ( it.hasNext() )
         {
             StoredProcedureParameter spParameter = it.next();
             MicroInjector injector = injectors.get( spParameter.getClass() );
             arguments.add( injector.inject( opContext, spParameter ) );
         }
-        
+
         return arguments;
     }
-    
-    
+
     MicroInjector $operationPrincipalInjector = new MicroInjector()
     {
         public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapException
@@ -104,19 +103,18 @@ public abstract class AbstractStoredProc
             return getOperationPrincipal();
         }
     };
-    
-    
+
     MicroInjector $ldapContextInjector = new MicroInjector()
     {
-        public Object inject(  OperationContext opContext, StoredProcedureParameter param
) throws LdapException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapException
         {
             Generic_LDAP_CONTEXT ldapCtxParam = ( Generic_LDAP_CONTEXT ) param;
             Dn ldapCtxName = ldapCtxParam.getCtxName();
-            
+
             CoreSession session = opContext.getSession();
             LookupOperationContext lookupContext = new LookupOperationContext( session, ldapCtxName
);
             lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
-            
+
             return session.getDirectoryService().getPartitionNexus().lookup( lookupContext
);
         }
     };

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
Tue Jan 24 15:43:19 2012
@@ -34,8 +34,8 @@ public class AddStoredProcedureParameter
 {
     private Dn addedEntryName;
     private Entry addedEntry;
-    
-    
+
+
     public AddStoredProcedureParameterInjector( OperationContext opContext, Dn addedEntryName,
         Entry addedEntry )
     {
@@ -47,17 +47,16 @@ public class AddStoredProcedureParameter
         injectors.put( StoredProcedureParameter.Add_ATTRIBUTES.class, $attributesInjector
);
     }
 
-    
     MicroInjector $entryInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return opContext.getSession().getDirectoryService().getDnFactory().create( addedEntryName.getName()
);
         }
     };
-    
-    
+
     MicroInjector $attributesInjector = new MicroInjector()
     {
         public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapException

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
Tue Jan 24 15:43:19 2012
@@ -37,7 +37,7 @@ public class DeleteStoredProcedureParame
     private Dn deletedEntryName;
     private Entry deletedEntry;
 
-    
+
     public DeleteStoredProcedureParameterInjector( OperationContext opContext, Dn deletedEntryName
)
         throws LdapException
     {
@@ -48,7 +48,7 @@ public class DeleteStoredProcedureParame
         injectors.put( StoredProcedureParameter.Delete_NAME.class, $nameInjector );
         injectors.put( StoredProcedureParameter.Delete_DELETED_ENTRY.class, $deletedEntryInjector
);
     }
-    
+
     MicroInjector $nameInjector = new MicroInjector()
     {
         public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapException
@@ -57,7 +57,7 @@ public class DeleteStoredProcedureParame
             return opContext.getSession().getDirectoryService().getDnFactory().create( deletedEntryName.getName()
);
         }
     };
-    
+
     MicroInjector $deletedEntryInjector = new MicroInjector()
     {
         public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapException
@@ -65,7 +65,7 @@ public class DeleteStoredProcedureParame
             return deletedEntry;
         }
     };
-    
+
 
     private Entry getDeletedEntry( OperationContext opContext ) throws LdapException
     {
@@ -74,7 +74,8 @@ public class DeleteStoredProcedureParame
          * especially subentry related ones like "triggerExecutionSubentries".
          */
         CoreSession session = opContext.getSession();
-        LookupOperationContext lookupContext = new LookupOperationContext( session, deletedEntryName,
SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+        LookupOperationContext lookupContext = new LookupOperationContext( session, deletedEntryName,
+            SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
 
         return session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
     }

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
Tue Jan 24 15:43:19 2012
@@ -41,17 +41,17 @@ public class ModifyDNStoredProcedurePara
 
 
     public ModifyDNStoredProcedureParameterInjector( OperationContext opContext, boolean
deleteOldRn,
-        Rdn oldRDN, Rdn newRdn, Dn oldSuperiorDn, Dn newSuperiorDn, Dn oldDn, Dn newDn)
+        Rdn oldRDN, Rdn newRdn, Dn oldSuperiorDn, Dn newSuperiorDn, Dn oldDn, Dn newDn )
     {
         super( opContext );
         this.deleteOldRn = deleteOldRn;
-        this.oldRdn = (Rdn)oldRDN.clone();
-        this.newRdn = (Rdn) newRdn.clone();
+        this.oldRdn = ( Rdn ) oldRDN.clone();
+        this.newRdn = ( Rdn ) newRdn.clone();
         this.oldSuperiorDn = oldSuperiorDn;
         this.newSuperiorDn = newSuperiorDn;
         this.oldDn = oldDn;
         this.newDn = newDn;
-        
+
         Map<Class<?>, MicroInjector> injectors = super.getInjectors();
         injectors.put( StoredProcedureParameter.ModifyDN_ENTRY.class, $entryInjector );
         injectors.put( StoredProcedureParameter.ModifyDN_NEW_RDN.class, $newrdnInjector );
@@ -60,14 +60,16 @@ public class ModifyDNStoredProcedurePara
         injectors.put( StoredProcedureParameter.ModifyDN_OLD_RDN.class, $oldRDNInjector );
         injectors.put( StoredProcedureParameter.ModifyDN_OLD_SUPERIOR_DN.class, $oldSuperiorDNInjector
);
         injectors.put( StoredProcedureParameter.ModifyDN_NEW_DN.class, $newDNInjector );
-        
+
     }
+
     /**
      * Injector for 'entry' parameter of ModifyDNRequest as in RFC4511.
      */
     MicroInjector $entryInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return opContext.getSession().getDirectoryService().getDnFactory().create( oldDn.getName()
);
@@ -79,7 +81,8 @@ public class ModifyDNStoredProcedurePara
      */
     MicroInjector $newrdnInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return opContext.getSession().getDirectoryService().getDnFactory().create( newRdn.getName()
);
@@ -91,7 +94,8 @@ public class ModifyDNStoredProcedurePara
      */
     MicroInjector $deleteoldrdnInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return deleteOldRn;
@@ -103,47 +107,51 @@ public class ModifyDNStoredProcedurePara
      */
     MicroInjector $newSuperiorInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return opContext.getSession().getDirectoryService().getDnFactory().create( newSuperiorDn.getName()
);
         }
     };
-    
+
     /**
      * Extra injector for 'oldRdn' which can be derived from parameters specified for ModifyDNRequest
as in RFC4511.
      */
     MicroInjector $oldRDNInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return opContext.getSession().getDirectoryService().getDnFactory().create( oldRdn.getName()
);
         }
     };
-    
+
     /**
      * Extra injector for 'oldRdn' which can be derived from parameters specified for ModifyDNRequest
as in RFC4511.
      */
     MicroInjector $oldSuperiorDNInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return opContext.getSession().getDirectoryService().getDnFactory().create( oldSuperiorDn.getName()
);
         }
     };
-    
+
     /**
      * Extra injector for 'newDn' which can be derived from parameters specified for ModifyDNRequest
as in RFC4511.
      */
     MicroInjector $newDNInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return opContext.getSession().getDirectoryService().getDnFactory().create( newDn.getName()
);
         }
     };
-    
+
 }

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
Tue Jan 24 15:43:19 2012
@@ -42,8 +42,8 @@ public class ModifyStoredProcedureParame
     private Dn modifiedEntryName;
     private List<Modification> modifications;
     private Entry oldEntry;
-    
-    
+
+
     public ModifyStoredProcedureParameterInjector( ModifyOperationContext opContext ) throws
LdapException
     {
         super( opContext );
@@ -56,34 +56,32 @@ public class ModifyStoredProcedureParame
         injectors.put( StoredProcedureParameter.Modify_OLD_ENTRY.class, $oldEntryInjector
);
         injectors.put( StoredProcedureParameter.Modify_NEW_ENTRY.class, $newEntryInjector
);
     }
-    
-    
+
     MicroInjector $objectInjector = new MicroInjector()
     {
-        public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapInvalidDnException
+        public Object inject( OperationContext opContext, StoredProcedureParameter param
)
+            throws LdapInvalidDnException
         {
             // Return a safe copy constructed with user provided name.
             return opContext.getSession().getDirectoryService().getDnFactory().create( modifiedEntryName.getName()
);
         }
     };
-    
-    
+
     MicroInjector $modificationInjector = new MicroInjector()
     {
         public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapException
         {
             List<Modification> newMods = new ArrayList<Modification>();
-            
-            for ( Modification mod:modifications )
+
+            for ( Modification mod : modifications )
             {
                 newMods.add( mod.clone() );
             }
-            
+
             return newMods;
         }
     };
-    
-    
+
     MicroInjector $oldEntryInjector = new MicroInjector()
     {
         public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapException
@@ -91,8 +89,7 @@ public class ModifyStoredProcedureParame
             return oldEntry;
         }
     };
-    
-    
+
     MicroInjector $newEntryInjector = new MicroInjector()
     {
         public Object inject( OperationContext opContext, StoredProcedureParameter param
) throws LdapException
@@ -100,8 +97,8 @@ public class ModifyStoredProcedureParame
             return getEntry( opContext );
         }
     };
-    
-    
+
+
     private Entry getEntry( OperationContext opContext ) throws LdapException
     {
         /**
@@ -109,7 +106,8 @@ public class ModifyStoredProcedureParame
          * especially subentry related ones like "triggerExecutionSubentries".
          */
         CoreSession session = opContext.getSession();
-        LookupOperationContext lookupContext = new LookupOperationContext( session, modifiedEntryName,
SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+        LookupOperationContext lookupContext = new LookupOperationContext( session, modifiedEntryName,
+            SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
 
         return session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
     }

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/SimpleTriggerExecutionAuthorizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/SimpleTriggerExecutionAuthorizer.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/SimpleTriggerExecutionAuthorizer.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/SimpleTriggerExecutionAuthorizer.java
Tue Jan 24 15:43:19 2012
@@ -28,7 +28,7 @@ import org.apache.directory.shared.ldap.
 public class SimpleTriggerExecutionAuthorizer implements TriggerExecutionAuthorizer
 {
     // private static Dn adminName;
-    
+
     static
     {
         //try
@@ -38,13 +38,15 @@ public class SimpleTriggerExecutionAutho
         //catch ( LdapInvalidDnException e )
         {
             // TODO Auto-generated catch block
-        //    e.printStackTrace();
+            //    e.printStackTrace();
         }
     }
-    
+
+
     public boolean hasPermission( OperationContext opContext ) throws LdapException
     {
         Dn principalName = opContext.getSession().getEffectivePrincipal().getDn();
-        return principalName.equals( opContext.getSession().getDirectoryService().getAdminSession().getAuthenticatedPrincipal().getDn()
);
+        return principalName.equals( opContext.getSession().getDirectoryService().getAdminSession()
+            .getAuthenticatedPrincipal().getDn() );
     }
 }

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/StoredProcedureParameterInjector.java
Tue Jan 24 15:43:19 2012
@@ -34,10 +34,9 @@ import org.apache.directory.shared.ldap.
  */
 public interface StoredProcedureParameterInjector
 {
-    List<Object> getArgumentsToInject( OperationContext opContext, 
+    List<Object> getArgumentsToInject( OperationContext opContext,
         List<StoredProcedureParameter> parameterList ) throws LdapException;
-    
-    
+
     public interface MicroInjector
     {
         Object inject( OperationContext opContext, StoredProcedureParameter param ) throws
LdapException;

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
Tue Jan 24 15:43:19 2012
@@ -96,6 +96,7 @@ public class TriggerInterceptor extends 
     /** The SubentryUtils instance */
     private static SubentryUtils subentryUtils;
 
+
     /**
      * Creates a new instance of a TriggerInterceptor.
      */
@@ -103,7 +104,7 @@ public class TriggerInterceptor extends 
     {
         super( InterceptorEnum.TRIGGER_INTERCEPTOR );
     }
-    
+
 
     /**
      * Adds prescriptiveTrigger TriggerSpecificaitons to a collection of
@@ -416,7 +417,8 @@ public class TriggerInterceptor extends 
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
         CoreSession session = moveContext.getSession();
-        LookupOperationContext lookupContext = new LookupOperationContext( session, dn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY
);
+        LookupOperationContext lookupContext = new LookupOperationContext( session, dn,
+            SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
 
         Entry importedEntry = directoryService.getPartitionNexus().lookup( lookupContext
);
 
@@ -480,7 +482,7 @@ public class TriggerInterceptor extends 
         Dn newDn = moveAndRenameContext.getNewDn();
 
         StoredProcedureParameterInjector injector = new ModifyDNStoredProcedureParameterInjector(
moveAndRenameContext,
-            deleteOldRn, oldRdn, newRdn, oldSuperiorDn, newSuperiorDn, oldDN, newDn);
+            deleteOldRn, oldRdn, newRdn, oldSuperiorDn, newSuperiorDn, oldDN, newDn );
 
         // Gather Trigger Specifications which apply to the entry being exported.
         List<TriggerSpecification> exportTriggerSpecs = new ArrayList<TriggerSpecification>();
@@ -493,7 +495,8 @@ public class TriggerInterceptor extends 
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
         CoreSession session = moveAndRenameContext.getSession();
-        LookupOperationContext lookupContext = new LookupOperationContext( session, oldDn,
SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+        LookupOperationContext lookupContext = new LookupOperationContext( session, oldDn,
+            SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
 
         Entry importedEntry = directoryService.getPartitionNexus().lookup( lookupContext
);
 
@@ -502,7 +505,7 @@ public class TriggerInterceptor extends 
         // we need to construct an entry to represent it
         // at least with minimal requirements which are object class
         // and access control subentry operational attributes.
-        Entry fakeImportedEntry = subentryUtils.getSubentryAttributes(newDn, importedEntry
);
+        Entry fakeImportedEntry = subentryUtils.getSubentryAttributes( newDn, importedEntry
);
 
         for ( Attribute attribute : importedEntry )
         {
@@ -521,7 +524,7 @@ public class TriggerInterceptor extends 
             importTriggerSpecs, LdapOperation.MODIFYDN_IMPORT );
 
         next( moveAndRenameContext );
-        triggerSpecCache.subentryRenamed( oldDN, newDn);
+        triggerSpecCache.subentryRenamed( oldDN, newDn );
 
         // Fire AFTER Triggers.
         List<TriggerSpecification> afterExportTriggerSpecs = exportTriggerMap.get(
ActionTime.AFTER );
@@ -548,7 +551,7 @@ public class TriggerInterceptor extends 
         }
 
         // Gather supplementary data.
-        Entry renamedEntry = ((ClonedServerEntry)renameContext.getEntry()).getClonedEntry();
+        Entry renamedEntry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getClonedEntry();
 
         // @TODO : To be completely reviewed !!!
         Rdn oldRdn = name.getRdn();
@@ -559,7 +562,7 @@ public class TriggerInterceptor extends 
         newDn = newDn.add( newRdn );
 
         StoredProcedureParameterInjector injector = new ModifyDNStoredProcedureParameterInjector(
renameContext,
-            deleteOldRn, oldRdn, newRdn, oldSuperiorDn, newSuperiorDn, oldDn, newDn);
+            deleteOldRn, oldRdn, newRdn, oldSuperiorDn, newSuperiorDn, oldDn, newDn );
 
         // Gather Trigger Specifications which apply to the entry being renamed.
         List<TriggerSpecification> triggerSpecs = new ArrayList<TriggerSpecification>();
@@ -570,7 +573,7 @@ public class TriggerInterceptor extends 
             triggerSpecs, LdapOperation.MODIFYDN_RENAME );
 
         next( renameContext );
-        triggerSpecCache.subentryRenamed( name, newDn);
+        triggerSpecCache.subentryRenamed( name, newDn );
 
         // Fire AFTER Triggers.
         List<TriggerSpecification> afterTriggerSpecs = triggerMap.get( ActionTime.AFTER
);
@@ -627,7 +630,8 @@ public class TriggerInterceptor extends 
     }
 
 
-    private Object executeProcedure( OperationContext opContext, String procedure, Object[]
values ) throws LdapException
+    private Object executeProcedure( OperationContext opContext, String procedure, Object[]
values )
+        throws LdapException
     {
         try
         {

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?rev=1235306&r1=1235305&r2=1235306&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
(original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
Tue Jan 24 15:43:19 2012
@@ -81,10 +81,10 @@ public class TriggerSpecCache
 
     /** a map of strings to TriggerSpecification collections */
     private final Map<String, List<TriggerSpecification>> triggerSpecs = new
HashMap<String, List<TriggerSpecification>>();
-    
+
     /** a handle on the partition nexus */
     private final PartitionNexus nexus;
-    
+
     /** a normalizing TriggerSpecification parser */
     private final TriggerSpecificationParser triggerSpecParser;
 
@@ -101,12 +101,12 @@ public class TriggerSpecCache
         final SchemaManager schemaManager = directoryService.getSchemaManager();
 
         triggerSpecParser = new TriggerSpecificationParser( new NormalizerMappingResolver()
+        {
+            public Map<String, OidNormalizer> getNormalizerMapping() throws Exception
             {
-                public Map<String, OidNormalizer> getNormalizerMapping() throws Exception
-                {
-                    return schemaManager.getNormalizerMapping();
-                }
-            });
+                return schemaManager.getNormalizerMapping();
+            }
+        } );
 
         initialize( directoryService );
     }
@@ -122,17 +122,18 @@ public class TriggerSpecCache
         AttributeType objectClassAt = directoryService.getSchemaManager().
             getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
 
-        for ( String suffix:suffixes )
+        for ( String suffix : suffixes )
         {
             Dn baseDn = directoryService.getDnFactory().create( suffix );
             ExprNode filter = new EqualityNode<String>( objectClassAt,
-                    new StringValue( ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC
) );
+                new StringValue( ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC ) );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
             Dn adminDn = directoryService.getDnFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
);
             CoreSession adminSession = new DefaultCoreSession(
-                new LdapPrincipal( directoryService.getSchemaManager(), adminDn, AuthenticationLevel.STRONG
), directoryService );
+                new LdapPrincipal( directoryService.getSchemaManager(), adminDn, AuthenticationLevel.STRONG
),
+                directoryService );
 
             SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession,
baseDn,
                 filter, ctls );
@@ -150,7 +151,8 @@ public class TriggerSpecCache
 
                     if ( triggerSpec == null )
                     {
-                        LOG.warn( "Found triggerExecutionSubentry '" + subentryDn + "' without
any " + PRESCRIPTIVE_TRIGGER_ATTR );
+                        LOG.warn( "Found triggerExecutionSubentry '" + subentryDn + "' without
any "
+                            + PRESCRIPTIVE_TRIGGER_ATTR );
                         continue;
                     }
 
@@ -189,7 +191,7 @@ public class TriggerSpecCache
 
         List<TriggerSpecification> subentryTriggerSpecs = new ArrayList<TriggerSpecification>();
 
-        for ( Value<?> value:triggerSpec )
+        for ( Value<?> value : triggerSpec )
         {
             TriggerSpecification item = null;
 



Mime
View raw message