directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r379013 [9/45] - in /directory/trunks/apacheds: ./ core-plugin/ core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/ core-shared/src/m...
Date Mon, 20 Feb 2006 03:58:21 GMT
Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java Sun Feb 19 19:57:02 2006
@@ -18,6 +18,7 @@
  */
 package org.apache.directory.server.core.configuration;
 
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -43,6 +44,7 @@
 import org.apache.directory.server.core.schema.bootstrap.*;
 import org.apache.directory.server.core.subtree.SubentryService;
 
+
 /**
  * A {@link Configuration} that starts up ApacheDS.
  *
@@ -60,11 +62,12 @@
     private boolean accessControlEnabled = false; // turn off by default
     private Set authenticatorConfigurations; // Set<AuthenticatorConfiguration>
     private List interceptorConfigurations; // Set<InterceptorConfiguration>
-    
+
     private Set bootstrapSchemas; // Set<BootstrapSchema>
     private Set contextPartitionConfigurations = new HashSet(); // Set<ContextPartitionConfiguration>
     private List testEntries = new ArrayList(); // List<Attributes>
-    
+
+
     /**
      * Creates a new instance with default settings.
      */
@@ -75,11 +78,12 @@
         setDefaultInterceptorConfigurations();
     }
 
+
     /**
      * Creates a new instance with default settings that operates on the
      * {@link DirectoryService} with the specified ID.
      */
-    public StartupConfiguration( String instanceId )
+    public StartupConfiguration(String instanceId)
     {
         setDefaultAuthenticatorConfigurations();
         setDefaultBootstrapSchemas();
@@ -87,13 +91,14 @@
         setInstanceId( instanceId );
     }
 
+
     private void setDefaultAuthenticatorConfigurations()
     {
-        Set set; 
-        
+        Set set;
+
         // Set default authenticator configurations
         set = new HashSet();
-        
+
         MutableAuthenticatorConfiguration authCfg;
 
         // Anonymous
@@ -107,48 +112,50 @@
         authCfg.setName( "Simple" );
         authCfg.setAuthenticator( new SimpleAuthenticator() );
         set.add( authCfg );
-        
+
         setAuthenticatorConfigurations( set );
     }
 
+
     private void setDefaultBootstrapSchemas()
     {
         Set set;
         // Set default bootstrap schemas
         set = new HashSet();
-        
+
         set.add( new CoreSchema() );
-        set.add( new CosineSchema() );        
-        set.add( new ApacheSchema() );        
-        set.add( new InetorgpersonSchema() );        
-        set.add( new JavaSchema() );        
+        set.add( new CosineSchema() );
+        set.add( new ApacheSchema() );
+        set.add( new InetorgpersonSchema() );
+        set.add( new JavaSchema() );
         set.add( new SystemSchema() );
         set.add( new CollectiveSchema() );
 
         setBootstrapSchemas( set );
     }
 
+
     private void setDefaultInterceptorConfigurations()
     {
         // Set default interceptor chains
         InterceptorConfiguration interceptorCfg;
         List list = new ArrayList();
-        
+
         interceptorCfg = new MutableInterceptorConfiguration();
         interceptorCfg.setName( "normalizationService" );
         interceptorCfg.setInterceptor( new NormalizationService() );
         list.add( interceptorCfg );
-        
+
         interceptorCfg = new MutableInterceptorConfiguration();
         interceptorCfg.setName( "authenticationService" );
         interceptorCfg.setInterceptor( new AuthenticationService() );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( "referralService" );
+        interceptorCfg.setName( ReferralService.NAME );
         interceptorCfg.setInterceptor( new ReferralService() );
         list.add( interceptorCfg );
-        
+
         interceptorCfg = new MutableInterceptorConfiguration();
         interceptorCfg.setName( "authorizationService" );
         interceptorCfg.setInterceptor( new AuthorizationService() );
@@ -163,12 +170,12 @@
         interceptorCfg.setName( "exceptionService" );
         interceptorCfg.setInterceptor( new ExceptionService() );
         list.add( interceptorCfg );
-        
+
         interceptorCfg = new MutableInterceptorConfiguration();
         interceptorCfg.setName( "schemaService" );
         interceptorCfg.setInterceptor( new SchemaService() );
         list.add( interceptorCfg );
-        
+
         interceptorCfg = new MutableInterceptorConfiguration();
         interceptorCfg.setName( "subentryService" );
         interceptorCfg.setInterceptor( new SubentryService() );
@@ -192,6 +199,7 @@
         setInterceptorConfigurations( list );
     }
 
+
     /**
      * Returns {@link AuthenticatorConfiguration}s to use for authenticating clients.
      */
@@ -200,32 +208,33 @@
         return ConfigurationUtil.getClonedSet( authenticatorConfigurations );
     }
 
+
     /**
      * Sets {@link AuthenticatorConfiguration}s to use for authenticating clients.
      */
     protected void setAuthenticatorConfigurations( Set authenticatorConfigurations )
     {
-        Set newSet = ConfigurationUtil.getTypeSafeSet(
-                authenticatorConfigurations, AuthenticatorConfiguration.class );
-        
+        Set newSet = ConfigurationUtil.getTypeSafeSet( authenticatorConfigurations, AuthenticatorConfiguration.class );
+
         Set names = new HashSet();
         Iterator i = newSet.iterator();
-        while( i.hasNext() )
+        while ( i.hasNext() )
         {
             AuthenticatorConfiguration cfg = ( AuthenticatorConfiguration ) i.next();
             cfg.validate();
-            
+
             String name = cfg.getName();
-            if( names.contains( name ) )
+            if ( names.contains( name ) )
             {
                 throw new ConfigurationException( "Duplicate authenticator name: " + name );
             }
             names.add( name );
         }
-        
+
         this.authenticatorConfigurations = newSet;
     }
 
+
     /**
      * Returns {@link BootstrapSchema}s to load while bootstrapping.
      */
@@ -234,15 +243,16 @@
         return ConfigurationUtil.getClonedSet( bootstrapSchemas );
     }
 
+
     /**
      * Sets {@link BootstrapSchema}s to load while bootstrapping.
      */
     protected void setBootstrapSchemas( Set bootstrapSchemas )
     {
-        this.bootstrapSchemas = ConfigurationUtil.getTypeSafeSet(
-                bootstrapSchemas, BootstrapSchema.class );
+        this.bootstrapSchemas = ConfigurationUtil.getTypeSafeSet( bootstrapSchemas, BootstrapSchema.class );
     }
 
+
     /**
      * Returns {@link DirectoryPartitionConfiguration}s to configure context partitions.
      */
@@ -251,32 +261,34 @@
         return ConfigurationUtil.getClonedSet( contextPartitionConfigurations );
     }
 
+
     /**
      * Sets {@link DirectoryPartitionConfiguration}s to configure context partitions.
      */
     protected void setContextPartitionConfigurations( Set contextParitionConfigurations )
     {
-        Set newSet = ConfigurationUtil.getTypeSafeSet(
-                contextParitionConfigurations, DirectoryPartitionConfiguration.class );
-        
+        Set newSet = ConfigurationUtil.getTypeSafeSet( contextParitionConfigurations,
+            DirectoryPartitionConfiguration.class );
+
         Set names = new HashSet();
         Iterator i = newSet.iterator();
-        while( i.hasNext() )
+        while ( i.hasNext() )
         {
             DirectoryPartitionConfiguration cfg = ( DirectoryPartitionConfiguration ) i.next();
             cfg.validate();
 
             String name = cfg.getName();
-            if( names.contains( name ) )
+            if ( names.contains( name ) )
             {
                 throw new ConfigurationException( "Duplicate partition name: " + name );
             }
             names.add( name );
         }
-        
+
         this.contextPartitionConfigurations = newSet;
     }
 
+
     /**
      * Returns <tt>true</tt> if access control checks are enbaled.
      */
@@ -285,6 +297,7 @@
         return accessControlEnabled;
     }
 
+
     /**
      * Sets whether to enable basic access control checks or not
      */
@@ -293,6 +306,7 @@
         this.accessControlEnabled = accessControlEnabled;
     }
 
+
     /**
      * Returns <tt>true</tt> if anonymous access is allowed.
      */
@@ -301,6 +315,7 @@
         return allowAnonymousAccess;
     }
 
+
     /**
      * Sets whether to allow anonymous access or not
      */
@@ -309,6 +324,7 @@
         this.allowAnonymousAccess = enableAnonymousAccess;
     }
 
+
     /**
      * Returns interceptor chain.
      */
@@ -317,23 +333,23 @@
         return ConfigurationUtil.getClonedList( interceptorConfigurations );
     }
 
+
     /**
      * Sets interceptor chain.
      */
     protected void setInterceptorConfigurations( List interceptorConfigurations )
     {
-        List newList = ConfigurationUtil.getTypeSafeList(
-                interceptorConfigurations, InterceptorConfiguration.class );
-        
+        List newList = ConfigurationUtil.getTypeSafeList( interceptorConfigurations, InterceptorConfiguration.class );
+
         Set names = new HashSet();
         Iterator i = newList.iterator();
-        while( i.hasNext() )
+        while ( i.hasNext() )
         {
             InterceptorConfiguration cfg = ( InterceptorConfiguration ) i.next();
             cfg.validate();
 
             String name = cfg.getName();
-            if( names.contains( name ) )
+            if ( names.contains( name ) )
             {
                 throw new ConfigurationException( "Duplicate interceptor name: " + name );
             }
@@ -343,6 +359,7 @@
         this.interceptorConfigurations = interceptorConfigurations;
     }
 
+
     /**
      * Returns test directory entries({@link Attributes}) to be loaded while
      * bootstrapping.
@@ -352,28 +369,30 @@
         return ConfigurationUtil.getClonedAttributesList( testEntries );
     }
 
+
     /**
      * Sets test directory entries({@link Attributes}) to be loaded while
      * bootstrapping.
      */
     protected void setTestEntries( List testEntries )
     {
-         testEntries = ConfigurationUtil.getClonedAttributesList(
-                ConfigurationUtil.getTypeSafeList( testEntries, Attributes.class ) );
-         
-         Iterator i = testEntries.iterator();
-         while( i.hasNext() )
-         {
-             Attributes entry = ( Attributes ) i.next();
-             if( entry.get( "dn" ) == null )
-             {
-                 throw new ConfigurationException( "Test entries must have DN attributes" );
-             }
-         }
+        testEntries = ConfigurationUtil.getClonedAttributesList( ConfigurationUtil.getTypeSafeList( testEntries,
+            Attributes.class ) );
+
+        Iterator i = testEntries.iterator();
+        while ( i.hasNext() )
+        {
+            Attributes entry = ( Attributes ) i.next();
+            if ( entry.get( "dn" ) == null )
+            {
+                throw new ConfigurationException( "Test entries must have DN attributes" );
+            }
+        }
 
-         this.testEntries = testEntries;
+        this.testEntries = testEntries;
     }
 
+
     /**
      * Returns working directory (counterpart of <tt>var/lib</tt>).
      */
@@ -382,6 +401,7 @@
         return workingDirectory;
     }
 
+
     /**
      * Sets working directory (counterpart of <tt>var/lib</tt>).
      */
@@ -389,19 +409,20 @@
     {
         this.workingDirectory = workingDirectory;
     }
-    
+
+
     public void validate()
     {
         setWorkingDirectory( workingDirectory );
     }
 
-    
+
     protected void setShutdownHookEnabled( boolean shutdownHookEnabled )
     {
         this.shutdownHookEnabled = shutdownHookEnabled;
     }
-    
-    
+
+
     public boolean isShutdownHookEnabled()
     {
         return shutdownHookEnabled;
@@ -412,8 +433,8 @@
     {
         this.exitVmOnShutdown = exitVmOnShutdown;
     }
-    
-    
+
+
     public boolean isExitVmOnShutdown()
     {
         return exitVmOnShutdown;

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java Sun Feb 19 19:57:02 2006
@@ -18,8 +18,10 @@
  */
 package org.apache.directory.server.core.configuration;
 
+
 import org.apache.directory.server.core.DirectoryService;
 
+
 /**
  * A {@link Configuration} that makes a call to {@link DirectoryService#sync()}.
  *
@@ -30,18 +32,20 @@
 {
     private static final long serialVersionUID = -3260859085299322327L;
 
+
     /**
      * Creates a new instance.
      */
     public SyncConfiguration()
     {
     }
-    
+
+
     /**
      * Creates a new instance that operates on the {@link DirectoryService}
      * with the specified ID.
      */
-    public SyncConfiguration( String instanceId )
+    public SyncConfiguration(String instanceId)
     {
         setInstanceId( instanceId );
     }

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java Sun Feb 19 19:57:02 2006
@@ -37,7 +37,7 @@
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
- 
+
 
 /**
  * A wrapper enumeration which saves referral entries to be returned last.
@@ -58,10 +58,10 @@
     private final int scope;
     private SearchResult prefetched;
     private int refIndex = -1;
-    
-    
-    public ReferralHandlingEnumeration( NamingEnumeration underlying, ReferralLut lut, DnParser parser, 
-        DirectoryPartitionNexus nexus, int scope, boolean doThrow ) throws NamingException
+
+
+    public ReferralHandlingEnumeration(NamingEnumeration underlying, ReferralLut lut, DnParser parser,
+        DirectoryPartitionNexus nexus, int scope, boolean doThrow) throws NamingException
     {
         this.underlying = underlying;
         this.parser = parser;
@@ -71,8 +71,8 @@
         this.nexus = nexus;
         prefetch();
     }
-    
-    
+
+
     public void prefetch() throws NamingException
     {
         while ( underlying.hasMore() )
@@ -87,7 +87,7 @@
             prefetched = result;
             return;
         }
-        
+
         refIndex++;
         prefetched = ( SearchResult ) referrals.get( refIndex );
         if ( doThrow )
@@ -95,8 +95,8 @@
             doReferralExceptionOnSearchBase();
         }
     }
-    
-    
+
+
     public Object next() throws NamingException
     {
         SearchResult retval = prefetched;
@@ -104,7 +104,7 @@
         return retval;
     }
 
-    
+
     public boolean hasMore() throws NamingException
     {
         return underlying.hasMore() || refIndex < referrals.size();
@@ -119,7 +119,7 @@
         refIndex = Integer.MAX_VALUE;
     }
 
-    
+
     public boolean hasMoreElements()
     {
         try
@@ -138,7 +138,7 @@
                 log.error( "Naming enumeration failure.  Failed to properly close enumeration!", e1 );
             }
         }
-        
+
         return false;
     }
 
@@ -153,7 +153,7 @@
         {
             log.error( "NamingEnumeration closed prematurely without returning elements.", e );
         }
-        
+
         throw new NoSuchElementException( "NamingEnumeration closed prematurely without returning elements." );
     }
 
@@ -166,25 +166,25 @@
         {
             refs = nexus.lookup( parser.parse( prefetched.getName() ) ).get( REF_ATTR );
         }
-        
+
         if ( refs == null )
         {
-            throw new IllegalStateException( prefetched.getName() 
+            throw new IllegalStateException( prefetched.getName()
                 + " does not seem like a referral but we're trying to handle it as one." );
         }
-        
+
         List list = new ArrayList( refs.size() );
         for ( int ii = 0; ii < refs.size(); ii++ )
         {
             String val = ( String ) refs.get( ii );
-            
+
             // need to add non-ldap URLs as-is
-            if ( ! val.startsWith( "ldap" ) )
+            if ( !val.startsWith( "ldap" ) )
             {
                 list.add( val );
                 continue;
             }
-            
+
             // parse the ref value and normalize the DN according to schema 
             LdapURL ldapUrl = new LdapURL();
             try
@@ -193,9 +193,11 @@
             }
             catch ( LdapURLEncodingException e )
             {
-                log.error( "Bad URL ("+ val +") for ref in " + prefetched.getName() + ".  Reference will be ignored." ); 
+                log
+                    .error( "Bad URL (" + val + ") for ref in " + prefetched.getName()
+                        + ".  Reference will be ignored." );
             }
-            
+
             StringBuffer buf = new StringBuffer();
             buf.append( ldapUrl.getScheme() );
             buf.append( ldapUrl.getHost() );
@@ -207,25 +209,25 @@
             buf.append( "/" );
             buf.append( ldapUrl.getDn() );
             buf.append( "??" );
-            
+
             switch ( scope )
             {
-                case( SearchControls.SUBTREE_SCOPE ):
+                case ( SearchControls.SUBTREE_SCOPE  ):
                     buf.append( "sub" );
                     break;
-                    
+
                 // if we search for one level and encounter a referral then search
                 // must be continued at that node using base level search scope
-                case( SearchControls.ONELEVEL_SCOPE ):
+                case ( SearchControls.ONELEVEL_SCOPE  ):
                     buf.append( "base" );
                     break;
-                case( SearchControls.OBJECT_SCOPE ):
+                case ( SearchControls.OBJECT_SCOPE  ):
                     buf.append( "base" );
                     break;
                 default:
                     throw new IllegalStateException( "Unknown recognized search scope: " + scope );
             }
-            
+
             list.add( buf.toString() );
         }
         LdapReferralException lre = new LdapReferralException( list );

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultEnumeration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultEnumeration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java Sun Feb 19 19:57:02 2006
@@ -45,6 +45,5 @@
      * @return true if the result is to be returned, false if it is to be
      * discarded from the result set
      */
-    boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
-        throws NamingException;
+    boolean accept( Invocation invocation, SearchResult result, SearchControls controls ) throws NamingException;
 }

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java Sun Feb 19 19:57:02 2006
@@ -78,7 +78,6 @@
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
 
-
     /**
      * Creates a new database result filtering enumeration to decorate an
      * underlying enumeration.
@@ -88,11 +87,8 @@
      * creating this enumeration
      * @param invocation the invocation representing the seach that created this enumeration
      */
-    public SearchResultFilteringEnumeration( NamingEnumeration decorated,
-                                             SearchControls searchControls,
-                                             Invocation invocation,
-                                             SearchResultFilter filter )
-            throws NamingException
+    public SearchResultFilteringEnumeration(NamingEnumeration decorated, SearchControls searchControls,
+        Invocation invocation, SearchResultFilter filter) throws NamingException
     {
         this.searchControls = searchControls;
         this.invocation = invocation;
@@ -101,7 +97,7 @@
         this.decorated = decorated;
         this.applyObjectFactories = invocation.getCaller().getEnvironment().containsKey( Context.OBJECT_FACTORIES );
 
-        if ( ! decorated.hasMore() )
+        if ( !decorated.hasMore() )
         {
             close();
             return;
@@ -120,11 +116,8 @@
      * creating this enumeration
      * @param invocation the invocation representing the seach that created this enumeration
      */
-    public SearchResultFilteringEnumeration( NamingEnumeration decorated,
-                                             SearchControls searchControls,
-                                             Invocation invocation,
-                                             List filters )
-            throws NamingException
+    public SearchResultFilteringEnumeration(NamingEnumeration decorated, SearchControls searchControls,
+        Invocation invocation, List filters) throws NamingException
     {
         this.searchControls = searchControls;
         this.invocation = invocation;
@@ -133,7 +126,7 @@
         this.decorated = decorated;
         this.applyObjectFactories = invocation.getCaller().getEnvironment().containsKey( Context.OBJECT_FACTORIES );
 
-        if ( ! decorated.hasMore() )
+        if ( !decorated.hasMore() )
         {
             close();
             return;
@@ -147,7 +140,6 @@
     // New SearchResultFilter management methods
     // ------------------------------------------------------------------------
 
-
     /**
      * Adds a database search result filter to this filtering enumeration at
      * the very end of the filter list.  Filters are applied in the order of
@@ -190,7 +182,6 @@
     // NamingEnumeration Methods
     // ------------------------------------------------------------------------
 
-
     public void close() throws NamingException
     {
         isClosed = true;
@@ -216,7 +207,6 @@
     // Enumeration Methods
     // ------------------------------------------------------------------------
 
-
     public boolean hasMoreElements()
     {
         return !isClosed;
@@ -244,11 +234,10 @@
     // Private utility methods
     // ------------------------------------------------------------------------
 
-
     private void applyObjectFactories( SearchResult result ) throws NamingException
     {
         // if already populated or no factories are available just return
-        if ( result.getObject() != null || ! applyObjectFactories )
+        if ( result.getObject() != null || !applyObjectFactories )
         {
             return;
         }
@@ -292,8 +281,7 @@
             throw new OperationAbandonedException();
         }
 
-        outer:
-        while( decorated.hasMore() )
+        outer: while ( decorated.hasMore() )
         {
             boolean accepted = true;
             tmp = ( SearchResult ) decorated.next();
@@ -307,8 +295,7 @@
             }
             else if ( filters.size() == 1 )
             {
-                accepted = ( ( SearchResultFilter ) filters.get( 0 ) )
-                        .accept( invocation, tmp, searchControls );
+                accepted = ( ( SearchResultFilter ) filters.get( 0 ) ).accept( invocation, tmp, searchControls );
                 if ( accepted )
                 {
                     this.prefetched = tmp;
@@ -320,12 +307,12 @@
             }
 
             // apply all filters shorting their application on result denials
-            for ( int ii = 0; ii < filters.size(); ii ++ )
+            for ( int ii = 0; ii < filters.size(); ii++ )
             {
                 SearchResultFilter filter = ( SearchResultFilter ) filters.get( ii );
                 accepted &= filter.accept( invocation, tmp, searchControls );
 
-                if ( ! accepted )
+                if ( !accepted )
                 {
                     continue outer;
                 }

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/Evaluator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java Sun Feb 19 19:57:02 2006
@@ -79,10 +79,10 @@
      * @param namingListener the naming listener to register
      */
     public void addNamingListener( EventContext ctx, Name name, ExprNode filter, SearchControls searchControls,
-                                   NamingListener namingListener )
+        NamingListener namingListener )
     {
-        ScopeNode scope = new ScopeNode( DerefAliasesEnum.NEVERDEREFALIASES, name.toString(),
-                searchControls.getSearchScope() );
+        ScopeNode scope = new ScopeNode( DerefAliasesEnum.NEVERDEREFALIASES, name.toString(), searchControls
+            .getSearchScope() );
         BranchNode and = new BranchNode( BranchNode.AND );
         and.addNode( scope );
         and.addNode( filter );
@@ -161,8 +161,8 @@
             {
                 NamespaceChangeListener nclistener = ( NamespaceChangeListener ) listener;
                 Binding binding = new Binding( upName, entry, false );
-                nclistener.objectAdded( new NamingEvent( rec.getEventContext(),
-                        NamingEvent.OBJECT_ADDED, binding, null, entry ) );
+                nclistener.objectAdded( new NamingEvent( rec.getEventContext(), NamingEvent.OBJECT_ADDED, binding,
+                    null, entry ) );
             }
         }
     }
@@ -188,8 +188,8 @@
             {
                 NamespaceChangeListener nclistener = ( NamespaceChangeListener ) listener;
                 Binding binding = new Binding( name.toString(), entry, false );
-                nclistener.objectRemoved( new NamingEvent( rec.getEventContext(),
-                        NamingEvent.OBJECT_REMOVED, null, binding, entry ) );
+                nclistener.objectRemoved( new NamingEvent( rec.getEventContext(), NamingEvent.OBJECT_REMOVED, null,
+                    binding, entry ) );
             }
         }
     }
@@ -215,12 +215,13 @@
                 ObjectChangeListener oclistener = ( ObjectChangeListener ) listener;
                 Binding before = new Binding( name.toString(), oriEntry, false );
                 Binding after = new Binding( name.toString(), entry, false );
-                oclistener.objectChanged( new NamingEvent( rec.getEventContext(),
-                        NamingEvent.OBJECT_CHANGED, after, before, mods ) );
+                oclistener.objectChanged( new NamingEvent( rec.getEventContext(), NamingEvent.OBJECT_CHANGED, after,
+                    before, mods ) );
             }
         }
     }
 
+
     public void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException
     {
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -269,8 +270,8 @@
                 NamespaceChangeListener nclistener = ( NamespaceChangeListener ) listener;
                 Binding oldBinding = new Binding( oldName.toString(), entry, false );
                 Binding newBinding = new Binding( newName.toString(), entry, false );
-                nclistener.objectRenamed( new NamingEvent( rec.getEventContext(),
-                        NamingEvent.OBJECT_RENAMED, newBinding, oldBinding, entry ) );
+                nclistener.objectRenamed( new NamingEvent( rec.getEventContext(), NamingEvent.OBJECT_RENAMED,
+                    newBinding, oldBinding, entry ) );
             }
         }
     }
@@ -287,7 +288,7 @@
 
 
     public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
-            throws NamingException
+        throws NamingException
     {
         super.move( next, oriChildName, newParentName, newRn, deleteOldRn );
         Name newName = ( Name ) newParentName.clone();
@@ -346,7 +347,6 @@
         return selecting;
     }
 
-
     class EventSourceRecord
     {
         private Name base;
@@ -355,7 +355,9 @@
         private EventContext context;
         private NamingListener listener;
 
-        public EventSourceRecord( Name base, ExprNode filter, EventContext context, SearchControls controls, NamingListener listener )
+
+        public EventSourceRecord(Name base, ExprNode filter, EventContext context, SearchControls controls,
+            NamingListener listener)
         {
             this.filter = filter;
             this.context = context;
@@ -364,25 +366,30 @@
             this.listener = listener;
         }
 
+
         public NamingListener getNamingListener()
         {
             return listener;
         }
 
+
         public ExprNode getFilter()
         {
             return filter;
         }
 
+
         public EventContext getEventContext()
         {
             return context;
         }
 
+
         public Name getBase()
         {
             return base;
         }
+
 
         public SearchControls getSearchControls()
         {

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java Sun Feb 19 19:57:02 2006
@@ -44,14 +44,13 @@
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
 
-
     /**
      * Creates a top level Evaluator where leaves are delegated to a leaf node
      * evaluator which is already provided.
      *
      * @param leafEvaluator handles leaf node evaluation.
      */
-    public ExpressionEvaluator( LeafEvaluator leafEvaluator )
+    public ExpressionEvaluator(LeafEvaluator leafEvaluator)
     {
         this.leafEvaluator = leafEvaluator;
     }
@@ -64,8 +63,8 @@
      * @param oidRegistry the oid reg used for attrID to oid resolution
      * @param attributeTypeRegistry the attribtype reg used for value comparison
      */
-    public ExpressionEvaluator( OidRegistry oidRegistry,
-                                AttributeTypeRegistry attributeTypeRegistry ) throws NamingException
+    public ExpressionEvaluator(OidRegistry oidRegistry, AttributeTypeRegistry attributeTypeRegistry)
+        throws NamingException
     {
         SubstringEvaluator substringEvaluator = null;
         substringEvaluator = new SubstringEvaluator( oidRegistry, attributeTypeRegistry );
@@ -88,59 +87,56 @@
     // Evaluator.evaluate() implementation
     // ------------------------------------------------------------------------
 
-
     /**
      * @see Evaluator#evaluate(ExprNode, String, Attributes)
      */
-    public boolean evaluate( ExprNode node, String dn, Attributes entry )
-        throws NamingException
+    public boolean evaluate( ExprNode node, String dn, Attributes entry ) throws NamingException
     {
-        if ( node.isLeaf() ) 
+        if ( node.isLeaf() )
         {
             return leafEvaluator.evaluate( node, dn, entry );
         }
 
         BranchNode bnode = ( BranchNode ) node;
 
-        switch( bnode.getOperator() )
+        switch ( bnode.getOperator() )
         {
-        case( BranchNode.OR ):
-            Iterator children = bnode.getChildren().iterator();
-            
-            while ( children.hasNext() ) 
-            {
-                ExprNode child = ( ExprNode ) children.next();
-                
-                if ( evaluate( child, dn, entry ) )
+            case ( BranchNode.OR  ):
+                Iterator children = bnode.getChildren().iterator();
+
+                while ( children.hasNext() )
                 {
-                    return true;
+                    ExprNode child = ( ExprNode ) children.next();
+
+                    if ( evaluate( child, dn, entry ) )
+                    {
+                        return true;
+                    }
                 }
-            }
 
-            return false;
-        case( BranchNode.AND ):
-            children = bnode.getChildren().iterator();
-            while ( children.hasNext() ) 
-            {
-                ExprNode child = ( ExprNode ) children.next();
+                return false;
+            case ( BranchNode.AND  ):
+                children = bnode.getChildren().iterator();
+                while ( children.hasNext() )
+                {
+                    ExprNode child = ( ExprNode ) children.next();
+
+                    if ( !evaluate( child, dn, entry ) )
+                    {
+                        return false;
+                    }
+                }
 
-                if ( ! evaluate( child, dn, entry ) )
+                return true;
+            case ( BranchNode.NOT  ):
+                if ( null != bnode.getChild() )
                 {
-                    return false;
+                    return !evaluate( bnode.getChild(), dn, entry );
                 }
-            }
 
-            return true;
-        case( BranchNode.NOT ):
-            if ( null != bnode.getChild() )
-            {
-                return ! evaluate( bnode.getChild(), dn, entry );
-            }
-
-            throw new NamingException( "Negation has no child: " + node );
-        default:
-            throw new NamingException( "Unrecognized branch node operator: "
-                + bnode.getOperator() );
+                throw new NamingException( "Negation has no child: " + node );
+            default:
+                throw new NamingException( "Unrecognized branch node operator: " + bnode.getOperator() );
         }
     }
 }

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java Sun Feb 19 19:57:02 2006
@@ -52,7 +52,6 @@
     /** substring matching type constant */
     private static final int SUBSTRING_MATCH = 3;
 
-
     /** Oid Registry used to translate attributeIds to OIDs */
     private OidRegistry oidRegistry;
     /** AttributeType registry needed for normalizing and comparing values */
@@ -68,9 +67,8 @@
      *
      * @param substringEvaluator
      */
-    public LeafEvaluator( OidRegistry oidRegistry,
-                          AttributeTypeRegistry attributeTypeRegistry,
-                          SubstringEvaluator substringEvaluator ) throws NamingException
+    public LeafEvaluator(OidRegistry oidRegistry, AttributeTypeRegistry attributeTypeRegistry,
+        SubstringEvaluator substringEvaluator) throws NamingException
     {
         this.oidRegistry = oidRegistry;
         this.attributeTypeRegistry = attributeTypeRegistry;
@@ -100,31 +98,30 @@
         {
             return scopeEvaluator.evaluate( node, dn, entry );
         }
-        
-        switch( ( ( LeafNode ) node ).getAssertionType() ) 
+
+        switch ( ( ( LeafNode ) node ).getAssertionType() )
         {
-        case( LeafNode.APPROXIMATE ):
-            return evalEquality( ( SimpleNode ) node, entry );
-        case( LeafNode.EQUALITY ):
-            return evalEquality( ( SimpleNode ) node, entry );
-        case( LeafNode.EXTENSIBLE ):
-            throw new NotImplementedException();
-        case( LeafNode.GREATEREQ ):
-            return evalGreater( ( SimpleNode ) node, entry, true );
-        case( LeafNode.LESSEQ ):
-            return evalGreater( ( SimpleNode ) node, entry, false );
-        case( LeafNode.PRESENCE ):
-            String attrId = ( ( PresenceNode ) node ).getAttribute();
-            return evalPresence( attrId, entry );
-        case( LeafNode.SUBSTRING ):
-            return substringEvaluator.evaluate( node, dn, entry );
-        default:
-            throw new NamingException( "Unrecognized leaf node type: "
-                + ( ( LeafNode ) node ).getAssertionType() );
+            case ( LeafNode.APPROXIMATE  ):
+                return evalEquality( ( SimpleNode ) node, entry );
+            case ( LeafNode.EQUALITY  ):
+                return evalEquality( ( SimpleNode ) node, entry );
+            case ( LeafNode.EXTENSIBLE  ):
+                throw new NotImplementedException();
+            case ( LeafNode.GREATEREQ  ):
+                return evalGreater( ( SimpleNode ) node, entry, true );
+            case ( LeafNode.LESSEQ  ):
+                return evalGreater( ( SimpleNode ) node, entry, false );
+            case ( LeafNode.PRESENCE  ):
+                String attrId = ( ( PresenceNode ) node ).getAttribute();
+                return evalPresence( attrId, entry );
+            case ( LeafNode.SUBSTRING  ):
+                return substringEvaluator.evaluate( node, dn, entry );
+            default:
+                throw new NamingException( "Unrecognized leaf node type: " + ( ( LeafNode ) node ).getAssertionType() );
         }
     }
-    
-    
+
+
     /**
      * Evaluates a simple greater than or less than attribute value assertion on
      * a perspective candidate.
@@ -136,8 +133,7 @@
      * @return the ava evaluation on the perspective candidate
      * @throws javax.naming.NamingException if there is a database access failure
      */
-    private boolean evalGreater( SimpleNode node, Attributes entry,
-        boolean isGreater ) throws NamingException
+    private boolean evalGreater( SimpleNode node, Attributes entry, boolean isGreater ) throws NamingException
     {
         String attrId = node.getAttribute();
 
@@ -149,7 +145,7 @@
         {
             return false;
         }
-        
+
         /*
          * We need to iterate through all values and for each value we normalize
          * and use the comparator to determine if a match exists.
@@ -158,7 +154,7 @@
         Comparator comparator = getComparator( attrId );
         Object filterValue = normalizer.normalize( node.getValue() );
         NamingEnumeration list = attr.getAll();
-        
+
         /*
          * Cheaper to not check isGreater in one loop - better to separate
          * out into two loops which you choose to execute based on isGreater
@@ -168,7 +164,7 @@
             while ( list.hasMore() )
             {
                 Object value = normalizer.normalize( list.next() );
-            
+
                 // Found a value that is greater than or equal to the ava value
                 if ( 0 >= comparator.compare( value, filterValue ) )
                 {
@@ -176,12 +172,12 @@
                 }
             }
         }
-        else 
-        {    
+        else
+        {
             while ( list.hasMore() )
             {
                 Object value = normalizer.normalize( list.next() );
-            
+
                 // Found a value that is less than or equal to the ava value
                 if ( 0 <= comparator.compare( value, filterValue ) )
                 {
@@ -189,12 +185,12 @@
                 }
             }
         }
-        
+
         // no match so return false
         return false;
     }
 
-    
+
     /**
      * Evaluates a simple presence attribute value assertion on a perspective
      * candidate.
@@ -209,7 +205,7 @@
         {
             return false;
         }
-        
+
         return null != entry.get( attrId );
     }
 
@@ -223,8 +219,7 @@
      * @return the ava evaluation on the perspective candidate
      * @throws javax.naming.NamingException if there is a database access failure
      */
-    private boolean evalEquality( SimpleNode node, Attributes entry )
-        throws NamingException
+    private boolean evalEquality( SimpleNode node, Attributes entry ) throws NamingException
     {
         Normalizer normalizer = getNormalizer( node.getAttribute() );
         Comparator comparator = getComparator( node.getAttribute() );
@@ -237,7 +232,7 @@
         {
             return false;
         }
-        
+
         // check if AVA value exists in attribute
         if ( attr.contains( node.getValue() ) )
         {
@@ -252,7 +247,7 @@
         {
             return true;
         }
-        
+
         /*
          * We need to now iterate through all values because we could not get
          * a lookup to work.  For each value we normalize and use the comparator
@@ -262,13 +257,13 @@
         while ( list.hasMore() )
         {
             Object value = normalizer.normalize( list.next() );
-            
+
             if ( 0 == comparator.compare( value, filterValue ) )
             {
                 return true;
             }
         }
-        
+
         // no match so return false
         return false;
     }
@@ -309,22 +304,21 @@
      * @return the matching rule
      * @throws javax.naming.NamingException if there is a failure
      */
-    private MatchingRule getMatchingRule( String attrId, int matchType )
-        throws NamingException
+    private MatchingRule getMatchingRule( String attrId, int matchType ) throws NamingException
     {
         MatchingRule mrule = null;
         String oid = oidRegistry.getOid( attrId );
         AttributeType type = attributeTypeRegistry.lookup( oid );
 
-        switch( matchType )
+        switch ( matchType )
         {
-            case( EQUALITY_MATCH ):
+            case ( EQUALITY_MATCH ):
                 mrule = type.getEquality();
                 break;
-            case( SUBSTRING_MATCH ):
+            case ( SUBSTRING_MATCH ):
                 mrule = type.getSubstr();
                 break;
-            case( ORDERING_MATCH ):
+            case ( ORDERING_MATCH ):
                 mrule = type.getOrdering();
                 break;
             default:

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java Sun Feb 19 19:57:02 2006
@@ -47,26 +47,25 @@
     /**
      * @see Evaluator#evaluate(ExprNode, String, Attributes)
      */
-    public boolean evaluate( ExprNode node, String dn, Attributes record )
-        throws NamingException
+    public boolean evaluate( ExprNode node, String dn, Attributes record ) throws NamingException
     {
         ScopeNode snode = ( ScopeNode ) node;
 
-        switch( snode.getScope() )
+        switch ( snode.getScope() )
         {
-        case( SearchControls.OBJECT_SCOPE ):
-            return dn.equals( snode.getBaseDn() );
-        case( SearchControls.ONELEVEL_SCOPE ):
-            if ( dn.endsWith( snode.getBaseDn() ) )
-            {
-                Name candidateDn = parser.parse( dn );
-                Name scopeDn = parser.parse( snode.getBaseDn() );
-                return ( scopeDn.size() + 1 ) == candidateDn.size();
-            }
-        case( SearchControls.SUBTREE_SCOPE ):
-            return dn.endsWith( snode.getBaseDn() );
-        default:
-            throw new NamingException( "Unrecognized search scope!" );
+            case ( SearchControls.OBJECT_SCOPE  ):
+                return dn.equals( snode.getBaseDn() );
+            case ( SearchControls.ONELEVEL_SCOPE  ):
+                if ( dn.endsWith( snode.getBaseDn() ) )
+                {
+                    Name candidateDn = parser.parse( dn );
+                    Name scopeDn = parser.parse( snode.getBaseDn() );
+                    return ( scopeDn.size() + 1 ) == candidateDn.size();
+                }
+            case ( SearchControls.SUBTREE_SCOPE  ):
+                return dn.endsWith( snode.getBaseDn() );
+            default:
+                throw new NamingException( "Unrecognized search scope!" );
         }
     }
 }

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java Sun Feb 19 19:57:02 2006
@@ -53,8 +53,7 @@
      * @param oidRegistry the OID registry for name to OID mapping
      * @param attributeTypeRegistry the attributeType registry
      */
-    public SubstringEvaluator( OidRegistry oidRegistry,
-                               AttributeTypeRegistry attributeTypeRegistry )
+    public SubstringEvaluator(OidRegistry oidRegistry, AttributeTypeRegistry attributeTypeRegistry)
     {
         this.oidRegistry = oidRegistry;
         this.attributeTypeRegistry = attributeTypeRegistry;
@@ -64,10 +63,9 @@
     /**
      * @see Evaluator#evaluate(ExprNode, String, Attributes)
      */
-    public boolean evaluate( ExprNode node, String dn, Attributes entry )
-        throws NamingException
+    public boolean evaluate( ExprNode node, String dn, Attributes entry ) throws NamingException
     {
-        Pattern regex = null; 
+        Pattern regex = null;
         SubstringNode snode = ( SubstringNode ) node;
         String oid = oidRegistry.getOid( snode.getAttribute() );
         AttributeType type = attributeTypeRegistry.lookup( oid );
@@ -75,7 +73,7 @@
 
         // get the attribute
         Attribute attr = entry.get( snode.getAttribute() );
-        
+
         // if the attribute does not exist just return false
         if ( null == attr )
         {
@@ -83,34 +81,32 @@
         }
 
         // compile the regular expression to search for a matching attribute
-        try 
+        try
         {
             regex = snode.getRegex( normalizer );
-        } 
-        catch ( PatternSyntaxException pse ) 
+        }
+        catch ( PatternSyntaxException pse )
         {
-            NamingException ne = new NamingException( "SubstringNode '" 
-                + node + "' had " + "incorrect syntax" );
+            NamingException ne = new NamingException( "SubstringNode '" + node + "' had " + "incorrect syntax" );
             ne.setRootCause( pse );
             throw ne;
         }
-        
+
         /*
          * Cycle through the attribute values testing normalized version 
          * obtained from using the substring matching rule's normalizer.
          * The test uses the comparator obtained from the appropriate 
          * substring matching rule.
-         */ 
+         */
         NamingEnumeration list = attr.getAll();
-        
-        while ( list.hasMore() ) 
+
+        while ( list.hasMore() )
         {
-            String value = ( String ) 
-                normalizer.normalize( list.next() );
-            
+            String value = ( String ) normalizer.normalize( list.next() );
+
             // Once match is found cleanup and return true
-            
-            if ( regex.matcher( value ).matches() ) 
+
+            if ( regex.matcher( value ).matches() )
             {
                 list.close();
                 return true;

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Sun Feb 19 19:57:02 2006
@@ -52,6 +52,7 @@
 {
     private DirectoryPartitionNexus nexus;
 
+
     /**
      * Creates an interceptor that is also the exception handling service.
      */
@@ -75,7 +76,8 @@
      * In the pre-invocation state this interceptor method checks to see if the entry to be added already exists.  If it
      * does an exception is raised.
      */
-    public void add( NextInterceptor nextInterceptor, String upName, Name normName, Attributes entry ) throws NamingException
+    public void add( NextInterceptor nextInterceptor, String upName, Name normName, Attributes entry )
+        throws NamingException
     {
         // check if the entry already exists
         if ( nextInterceptor.hasEntry( normName ) )
@@ -95,8 +97,7 @@
         Attribute objectClass = attrs.get( "objectClass" );
         if ( objectClass.contains( "alias" ) )
         {
-            String msg = "Attempt to add entry to alias '" + upName
-                    + "' not allowed.";
+            String msg = "Attempt to add entry to alias '" + upName + "' not allowed.";
             ResultCodeEnum rc = ResultCodeEnum.ALIASPROBLEM;
             NamingException e = new LdapNamingException( msg, rc );
             e.setResolvedName( parentDn );
@@ -178,7 +179,8 @@
     /**
      * Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
      */
-    public void modify( NextInterceptor nextInterceptor, Name name, int modOp, Attributes attrs ) throws NamingException
+    public void modify( NextInterceptor nextInterceptor, Name name, int modOp, Attributes attrs )
+        throws NamingException
     {
         // check if entry to modify exists
         String msg = "Attempt to modify non-existant entry: ";
@@ -200,8 +202,8 @@
                     {
                         if ( entryAttr.contains( modAttr.get( ii ) ) )
                         {
-                            throw new LdapAttributeInUseException( "Trying to add existing value '"
-                                    + modAttr.get( ii ) + "' to attribute " + attrId );
+                            throw new LdapAttributeInUseException( "Trying to add existing value '" + modAttr.get( ii )
+                                + "' to attribute " + attrId );
                         }
                     }
                 }
@@ -234,8 +236,8 @@
                     {
                         if ( entryAttr.contains( modAttr.get( jj ) ) )
                         {
-                            throw new LdapAttributeInUseException( "Trying to add existing value '"
-                                    + modAttr.get( ii ) + "' to attribute " + modAttr.getID() );
+                            throw new LdapAttributeInUseException( "Trying to add existing value '" + modAttr.get( ii )
+                                + "' to attribute " + modAttr.getID() );
                         }
                     }
                 }
@@ -248,7 +250,8 @@
     /**
      * Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
      */
-    public void modifyRn( NextInterceptor nextInterceptor, Name dn, String newRn, boolean deleteOldRn ) throws NamingException
+    public void modifyRn( NextInterceptor nextInterceptor, Name dn, String newRn, boolean deleteOldRn )
+        throws NamingException
     {
         // check if entry to rename exists
         String msg = "Attempt to rename non-existant entry: ";
@@ -259,8 +262,7 @@
         if ( nextInterceptor.hasEntry( target ) )
         {
             LdapNameAlreadyBoundException e = null;
-            e = new LdapNameAlreadyBoundException( "target entry " + target
-                    + " already exists!" );
+            e = new LdapNameAlreadyBoundException( "target entry " + target + " already exists!" );
             e.setResolvedName( target );
             throw e;
         }
@@ -290,8 +292,7 @@
         if ( nextInterceptor.hasEntry( target ) )
         {
             LdapNameAlreadyBoundException e = null;
-            e = new LdapNameAlreadyBoundException( "target entry " + target
-                    + " already exists!" );
+            e = new LdapNameAlreadyBoundException( "target entry " + target + " already exists!" );
             e.setResolvedName( target );
             throw e;
         }
@@ -304,9 +305,8 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void move( NextInterceptor nextInterceptor,
-                      Name oriChildName, Name newParentName, String newRn,
-                      boolean deleteOldRn ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, Name oriChildName, Name newParentName, String newRn,
+        boolean deleteOldRn ) throws NamingException
     {
         // check if child to move exists
         String msg = "Attempt to move to non-existant parent: ";
@@ -322,8 +322,7 @@
         if ( nextInterceptor.hasEntry( target ) )
         {
             LdapNameAlreadyBoundException e = null;
-            e = new LdapNameAlreadyBoundException( "target entry " + target
-                    + " already exists!" );
+            e = new LdapNameAlreadyBoundException( "target entry " + target + " already exists!" );
             e.setResolvedName( target );
             throw e;
         }
@@ -335,9 +334,8 @@
     /**
      * Checks to see the entry being searched exists, otherwise throws the appropriate LdapException.
      */
-    public NamingEnumeration search( NextInterceptor nextInterceptor,
-                                     Name base, Map env, ExprNode filter,
-                                     SearchControls searchCtls ) throws NamingException
+    public NamingEnumeration search( NextInterceptor nextInterceptor, Name base, Map env, ExprNode filter,
+        SearchControls searchCtls ) throws NamingException
     {
         String msg = "Attempt to search under non-existant entry: ";
 

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java Sun Feb 19 19:57:02 2006
@@ -57,7 +57,8 @@
         ServerContext ctx = ( ServerContext ) getContext();
         return ctx.getPrincipal();
     }
-    
+
+
     /**
      * Returns the current JNDI {@link Context}.
      */
@@ -179,7 +180,8 @@
     }
 
 
-    public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn ) throws NamingException
+    public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
+        throws NamingException
     {
         next.move( oriChildName, newParentName, newRn, deleteOldRn );
     }
@@ -191,32 +193,38 @@
     }
 
 
-    public NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter, SearchControls searchCtls ) throws NamingException
+    public NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter,
+        SearchControls searchCtls ) throws NamingException
     {
         return next.search( base, env, filter, searchCtls );
     }
 
+
     public void addContextPartition( NextInterceptor next, DirectoryPartitionConfiguration cfg ) throws NamingException
     {
         next.addContextPartition( cfg );
     }
 
+
     public void removeContextPartition( NextInterceptor next, Name suffix ) throws NamingException
     {
         next.removeContextPartition( suffix );
     }
 
+
     public boolean compare( NextInterceptor next, Name name, String oid, Object value ) throws NamingException
     {
         return next.compare( name, oid, value );
     }
-    
+
+
     public void bind( NextInterceptor next, Name bindDn, byte[] credentials, List mechanisms, String saslAuthId )
         throws NamingException
     {
         next.bind( bindDn, credentials, mechanisms, saslAuthId );
     }
-    
+
+
     public void unbind( NextInterceptor next, Name bindDn ) throws NamingException
     {
         next.unbind( bindDn );

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java Sun Feb 19 19:57:02 2006
@@ -107,118 +107,143 @@
      */
     void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException;
 
+
     /**
      * Deinitializes this interceptor.  This is invoked by {@link InterceptorChain}
      * when this intercepter is unloaded from interceptor chain.
      */
     void destroy();
 
+
     /**
      * Filters {@link DirectoryPartitionNexus#getRootDSE()} call.
      */
-    Attributes getRootDSE( NextInterceptor next ) throws NamingException; 
+    Attributes getRootDSE( NextInterceptor next ) throws NamingException;
+
 
     /**
      * Filters {@link DirectoryPartitionNexus#getMatchedName(Name, boolean)} call.
      */
     Name getMatchedName( NextInterceptor next, Name name, boolean normalized ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartitionNexus#getSuffix(Name, boolean)} call.
      */
     Name getSuffix( NextInterceptor next, Name name, boolean normalized ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartitionNexus#listSuffixes(boolean)} call.
      */
     Iterator listSuffixes( NextInterceptor next, boolean normalized ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartitionNexus#addContextPartition(DirectoryPartitionConfiguration)} call.
      */
     void addContextPartition( NextInterceptor next, DirectoryPartitionConfiguration cfg ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartitionNexus#removeContextPartition(Name)} call.
      */
     void removeContextPartition( NextInterceptor next, Name suffix ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartitionNexus#compare(Name,String,Object)} call.
      */
     boolean compare( NextInterceptor next, Name name, String oid, Object value ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#delete(Name)} call.
      */
     void delete( NextInterceptor next, Name name ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#add(String, Name, Attributes)} call.
      */
-    void add( NextInterceptor next, String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;
+    void add( NextInterceptor next, String userProvidedName, Name normalizedName, Attributes entry )
+        throws NamingException;
+
 
     /**
      * Filters {@link DirectoryPartition#modify(Name, int, Attributes)} call.
      */
     void modify( NextInterceptor next, Name name, int modOp, Attributes attributes ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#modify(Name, ModificationItem[])} call.
      */
-    void modify( NextInterceptor next, Name name, ModificationItem [] items ) throws NamingException;
+    void modify( NextInterceptor next, Name name, ModificationItem[] items ) throws NamingException;
+
 
     /**
      * Filters {@link DirectoryPartition#list(Name)} call.
      */
     NamingEnumeration list( NextInterceptor next, Name baseName ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#search(Name, Map, ExprNode, SearchControls)} call.
      */
     NamingEnumeration search( NextInterceptor next, Name baseName, Map environment, ExprNode filter,
-                              SearchControls searchControls ) throws NamingException;
+        SearchControls searchControls ) throws NamingException;
+
+
     /**
      * Filters {@link DirectoryPartition#lookup(Name)} call.
      */
     Attributes lookup( NextInterceptor next, Name name ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#lookup(Name, String[])} call.
      */
-    Attributes lookup( NextInterceptor next, Name dn, String [] attrIds ) throws NamingException;
+    Attributes lookup( NextInterceptor next, Name dn, String[] attrIds ) throws NamingException;
+
 
     /**
      * Filters {@link DirectoryPartition#lookup(Name, String[])} call.
      */
     boolean hasEntry( NextInterceptor next, Name name ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#isSuffix(Name)} call.
      */
     boolean isSuffix( NextInterceptor next, Name name ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#modifyRn(Name, String, boolean)} call.
      */
     void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#move(Name, Name)} call.
      */
     void move( NextInterceptor next, Name oldName, Name newParentName ) throws NamingException;
 
+
     /**
      * Filters {@link DirectoryPartition#move(Name, Name, String, boolean)} call.
      */
-    void move( NextInterceptor next, Name oldName, Name newParentName, String newRn,
-               boolean deleteOldRn ) throws NamingException;
+    void move( NextInterceptor next, Name oldName, Name newParentName, String newRn, boolean deleteOldRn )
+        throws NamingException;
+
 
     /**
      * Filters {@link DirectoryPartition#bind(Name, byte[], List, String)} call.
      */
     void bind( NextInterceptor next, Name bindDn, byte[] credentials, List mechanisms, String saslAuthId )
         throws NamingException;
+
 
     /**
      * Filters {@link DirectoryPartition#unbind(Name)} call.

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id



Mime
View raw message