directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376623 [8/38] - in /directory/sandbox/akarasulu/rc1/apacheds: 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/src/main/java/org/a...
Date Fri, 10 Feb 2006 10:49:57 GMT
Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilter.java Fri Feb 10 02:48:07 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;
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/enumeration/SearchResultFilteringEnumeration.java Fri Feb 10 02:48:07 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;
                 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java Fri Feb 10 02:48:07 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()
         {

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java Fri Feb 10 02:48:07 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() );
         }
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java Fri Feb 10 02:48:07 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:

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java Fri Feb 10 02:48:07 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!" );
         }
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java Fri Feb 10 02:48:07 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;

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Fri Feb 10 02:48:07 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: ";
 

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java Fri Feb 10 02:48:07 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 );

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java Fri Feb 10 02:48:07 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.

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java Fri Feb 10 02:48:07 2006
@@ -49,11 +49,12 @@
 public class InterceptorChain
 {
     private static final Logger log = LoggerFactory.getLogger( InterceptorChain.class );
-    
+
     private final Interceptor FINAL_INTERCEPTOR = new Interceptor()
     {
         private DirectoryPartitionNexus nexus;
 
+
         public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg )
         {
             this.nexus = factoryCfg.getPartitionNexus();
@@ -126,7 +127,8 @@
         }
 
 
-        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 nexus.search( base, env, filter, searchCtls );
         }
@@ -156,7 +158,8 @@
         }
 
 
-        public void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException
+        public void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn )
+            throws NamingException
         {
             nexus.modifyRn( name, newRn, deleteOldRn );
         }
@@ -168,13 +171,15 @@
         }
 
 
-        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
         {
             nexus.move( oriChildName, newParentName, newRn, deleteOldRn );
         }
 
 
-        public void addContextPartition( NextInterceptor next, DirectoryPartitionConfiguration cfg ) throws NamingException
+        public void addContextPartition( NextInterceptor next, DirectoryPartitionConfiguration cfg )
+            throws NamingException
         {
             nexus.addContextPartition( cfg );
         }
@@ -186,7 +191,8 @@
         }
 
 
-        public void bind( NextInterceptor next, Name bindDn, byte[] credentials, List mechanisms, String saslAuthId ) throws NamingException
+        public void bind( NextInterceptor next, Name bindDn, byte[] credentials, List mechanisms, String saslAuthId )
+            throws NamingException
         {
             nexus.bind( bindDn, credentials, mechanisms, saslAuthId );
         }
@@ -206,6 +212,7 @@
 
     private DirectoryServiceConfiguration factoryCfg;
 
+
     /**
      * Create a new interceptor chain.
      */
@@ -235,15 +242,15 @@
         Interceptor interceptor = null;
         try
         {
-            while( i.hasNext() )
+            while ( i.hasNext() )
             {
                 InterceptorConfiguration cfg = ( InterceptorConfiguration ) i.next();
-                
-                if ( log.isDebugEnabled() ) 
+
+                if ( log.isDebugEnabled() )
                 {
-                	log.debug( "Adding interceptor " + cfg.getName() ); 
+                    log.debug( "Adding interceptor " + cfg.getName() );
                 }
-                
+
                 register( cfg );
             }
         }
@@ -282,7 +289,7 @@
         while ( i.hasNext() )
         {
             e = ( Entry ) i.next();
-            if( e != tail )
+            if ( e != tail )
             {
                 try
                 {
@@ -290,8 +297,7 @@
                 }
                 catch ( Throwable t )
                 {
-                    log.warn( "Failed to deregister an interceptor: " +
-                            e.configuration.getName(), t );
+                    log.warn( "Failed to deregister an interceptor: " + e.configuration.getName(), t );
                 }
             }
         }
@@ -304,8 +310,8 @@
      */
     public Interceptor get( String interceptorName )
     {
-        Entry e = (Entry) name2entry.get( interceptorName );
-        if( e == null )
+        Entry e = ( Entry ) name2entry.get( interceptorName );
+        if ( e == null )
         {
             return null;
         }
@@ -313,6 +319,7 @@
         return e.configuration.getInterceptor();
     }
 
+
     /**
      * Returns the list of all registered interceptors.
      */
@@ -330,35 +337,42 @@
         return result;
     }
 
+
     public synchronized void addFirst( InterceptorConfiguration cfg ) throws NamingException
     {
         register0( cfg, head );
     }
 
+
     public synchronized void addLast( InterceptorConfiguration cfg ) throws NamingException
     {
         register0( cfg, tail );
     }
 
-    public synchronized void addBefore( String nextInterceptorName, InterceptorConfiguration cfg ) throws NamingException
+
+    public synchronized void addBefore( String nextInterceptorName, InterceptorConfiguration cfg )
+        throws NamingException
     {
-        Entry e = (Entry) name2entry.get( nextInterceptorName );
-        if( e == null )
+        Entry e = ( Entry ) name2entry.get( nextInterceptorName );
+        if ( e == null )
         {
             throw new ConfigurationException( "Interceptor not found: " + nextInterceptorName );
         }
         register0( cfg, e );
     }
 
+
     public synchronized InterceptorConfiguration remove( String interceptorName ) throws NamingException
     {
         return deregister( interceptorName );
     }
 
-    public synchronized void addAfter( String prevInterceptorName, InterceptorConfiguration cfg ) throws NamingException
+
+    public synchronized void addAfter( String prevInterceptorName, InterceptorConfiguration cfg )
+        throws NamingException
     {
-        Entry e = (Entry) name2entry.get( prevInterceptorName );
-        if( e == null )
+        Entry e = ( Entry ) name2entry.get( prevInterceptorName );
+        if ( e == null )
         {
             throw new ConfigurationException( "Interceptor not found: " + prevInterceptorName );
         }
@@ -385,7 +399,7 @@
         Entry prevEntry = entry.prevEntry;
         Entry nextEntry = entry.nextEntry;
 
-        if( nextEntry == null )
+        if ( nextEntry == null )
         {
             // Don't deregister tail
             return null;
@@ -416,13 +430,13 @@
         interceptor.init( factoryCfg, cfg );
 
         Entry newEntry;
-        if( nextEntry == head )
+        if ( nextEntry == head )
         {
             newEntry = new Entry( null, head, cfg );
             head.prevEntry = newEntry;
             head = newEntry;
         }
-        else if( head == tail )
+        else if ( head == tail )
         {
             newEntry = new Entry( null, tail, cfg );
             tail.prevEntry = newEntry;
@@ -482,7 +496,7 @@
         }
 
         Invocation invocation = InvocationStack.getInstance().peek();
-        if ( ! invocation.hasBypass() )
+        if ( !invocation.hasBypass() )
         {
             return head;
         }
@@ -613,6 +627,7 @@
         }
     }
 
+
     public void addContextPartition( DirectoryPartitionConfiguration cfg ) throws NamingException
     {
         Entry entry = getStartingEntry();
@@ -633,6 +648,7 @@
         }
     }
 
+
     public void removeContextPartition( Name suffix ) throws NamingException
     {
         Entry entry = getStartingEntry();
@@ -653,6 +669,7 @@
         }
     }
 
+
     public void delete( Name name ) throws NamingException
     {
         Entry entry = getStartingEntry();
@@ -712,7 +729,7 @@
         }
     }
 
-    
+
     public void unbind( Name bindDn ) throws NamingException
     {
         Entry node = getStartingEntry();
@@ -732,7 +749,7 @@
         }
     }
 
-    
+
     public void modify( Name name, int modOp, Attributes mods ) throws NamingException
     {
         Entry entry = getStartingEntry();
@@ -794,7 +811,8 @@
     }
 
 
-    public NamingEnumeration search( Name base, Map env, ExprNode filter, SearchControls searchCtls ) throws NamingException
+    public NamingEnumeration search( Name base, Map env, ExprNode filter, SearchControls searchCtls )
+        throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
@@ -958,7 +976,6 @@
         }
     }
 
-
     /**
      * Represents an internal entry of this chain.
      */
@@ -973,10 +990,9 @@
         private final NextInterceptor nextInterceptor;
 
 
-        private Entry( Entry prevEntry, Entry nextEntry,
-                       InterceptorConfiguration configuration )
+        private Entry(Entry prevEntry, Entry nextEntry, InterceptorConfiguration configuration)
         {
-            if( configuration == null )
+            if ( configuration == null )
             {
                 throw new NullPointerException( "configuration" );
             }
@@ -994,18 +1010,18 @@
                     }
 
                     Invocation invocation = InvocationStack.getInstance().peek();
-                    if ( ! invocation.hasBypass() )
+                    if ( !invocation.hasBypass() )
                     {
                         return Entry.this.nextEntry;
                     }
 
-//  I don't think we really need this since this check is performed by the chain when
-//  getting the interceptor head to use.
-//
-//                    if ( invocation.isBypassed( DirectoryPartitionNexusProxy.BYPASS_ALL ) )
-//                    {
-//                        return tail;
-//                    }
+                    //  I don't think we really need this since this check is performed by the chain when
+                    //  getting the interceptor head to use.
+                    //
+                    //                    if ( invocation.isBypassed( DirectoryPartitionNexusProxy.BYPASS_ALL ) )
+                    //                    {
+                    //                        return tail;
+                    //                    }
 
                     Entry next = Entry.this.nextEntry;
                     while ( next != tail )
@@ -1023,6 +1039,7 @@
                     return next;
                 }
 
+
                 public boolean compare( Name name, String oid, Object value ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1064,6 +1081,7 @@
                     }
                 }
 
+
                 public Name getMatchedName( Name dn, boolean normalized ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1084,6 +1102,7 @@
                     }
                 }
 
+
                 public Name getSuffix( Name dn, boolean normalized ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1104,6 +1123,7 @@
                     }
                 }
 
+
                 public Iterator listSuffixes( boolean normalized ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1124,6 +1144,7 @@
                     }
                 }
 
+
                 public void delete( Name name ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1143,6 +1164,7 @@
                     }
                 }
 
+
                 public void add( String upName, Name normName, Attributes entry ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1162,6 +1184,7 @@
                     }
                 }
 
+
                 public void modify( Name name, int modOp, Attributes mods ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1181,6 +1204,7 @@
                     }
                 }
 
+
                 public void modify( Name name, ModificationItem[] mods ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1200,6 +1224,7 @@
                     }
                 }
 
+
                 public NamingEnumeration list( Name base ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1220,7 +1245,9 @@
                     }
                 }
 
-                public NamingEnumeration search( Name base, Map env, ExprNode filter, SearchControls searchCtls ) throws NamingException
+
+                public NamingEnumeration search( Name base, Map env, ExprNode filter, SearchControls searchCtls )
+                    throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
@@ -1240,6 +1267,7 @@
                     }
                 }
 
+
                 public Attributes lookup( Name name ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1260,6 +1288,7 @@
                     }
                 }
 
+
                 public Attributes lookup( Name dn, String[] attrIds ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1280,6 +1309,7 @@
                     }
                 }
 
+
                 public boolean hasEntry( Name name ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1300,6 +1330,7 @@
                     }
                 }
 
+
                 public boolean isSuffix( Name name ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1320,6 +1351,7 @@
                     }
                 }
 
+
                 public void modifyRn( Name name, String newRn, boolean deleteOldRn ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1339,6 +1371,7 @@
                     }
                 }
 
+
                 public void move( Name oriChildName, Name newParentName ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1358,7 +1391,9 @@
                     }
                 }
 
-                public void move( Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn ) throws NamingException
+
+                public void move( Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )
+                    throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
@@ -1378,7 +1413,8 @@
                 }
 
 
-                public void bind( Name bindDn, byte[] credentials, List mechanisms, String saslAuthId ) throws NamingException
+                public void bind( Name bindDn, byte[] credentials, List mechanisms, String saslAuthId )
+                    throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
@@ -1397,6 +1433,7 @@
                     }
                 }
 
+
                 public void unbind( Name bindDn ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1416,6 +1453,7 @@
                     }
                 }
 
+
                 public void addContextPartition( DirectoryPartitionConfiguration cfg ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1435,6 +1473,7 @@
                         throw new InternalError(); // Should be unreachable
                     }
                 }
+
 
                 public void removeContextPartition( Name suffix ) throws NamingException
                 {

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java Fri Feb 10 02:48:07 2006
@@ -42,7 +42,7 @@
      *
      * @param interceptor the Interceptor causing the failure
      */
-    public InterceptorException( Interceptor interceptor )
+    public InterceptorException(Interceptor interceptor)
     {
         this.interceptor = interceptor;
     }
@@ -54,7 +54,7 @@
      * @param interceptor the Interceptor causing the failure
      * @param explanation String explanation of why the Interceptor failed
      */
-    public InterceptorException( Interceptor interceptor, String explanation )
+    public InterceptorException(Interceptor interceptor, String explanation)
     {
         super( explanation );
         this.interceptor = interceptor;
@@ -67,7 +67,7 @@
      * @param interceptor the Interceptor causing the failure
      * @param rootCause   the root cause of this exception
      */
-    public InterceptorException( Interceptor interceptor, Throwable rootCause )
+    public InterceptorException(Interceptor interceptor, Throwable rootCause)
     {
         this( interceptor );
         super.setRootCause( rootCause );
@@ -81,8 +81,7 @@
      * @param explanation String explanation of why the Interceptor failed
      * @param rootCause   the root cause of this exception
      */
-    public InterceptorException( Interceptor interceptor, String explanation,
-                                 Throwable rootCause )
+    public InterceptorException(Interceptor interceptor, String explanation, Throwable rootCause)
     {
         this( interceptor, explanation );
         super.setRootCause( rootCause );

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java Fri Feb 10 02:48:07 2006
@@ -46,90 +46,130 @@
     /**
      * Calls the next interceptor's {@link Interceptor#compare(NextInterceptor,Name,String,Object)}.
      */
-    boolean compare(Name name, String oid, Object value ) throws NamingException;
-    
+    boolean compare( Name name, String oid, Object value ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#getRootDSE(NextInterceptor)}.
      */
-    Attributes getRootDSE() throws NamingException; 
+    Attributes getRootDSE() throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#getMatchedName(NextInterceptor, Name, boolean)}.
      */
     Name getMatchedName( Name name, boolean normalized ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#getSuffix(NextInterceptor, Name, boolean)}.
      */
     Name getSuffix( Name name, boolean normalized ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#listSuffixes(NextInterceptor, boolean)}.
      */
     Iterator listSuffixes( boolean normalized ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link DirectoryPartitionNexus#addContextPartition(DirectoryPartitionConfiguration)}.
      */
     void addContextPartition( DirectoryPartitionConfiguration cfg ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link DirectoryPartitionNexus#removeContextPartition(Name)}.
      */
     void removeContextPartition( Name suffix ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, Name)}.
      */
     void delete( Name name ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#add(NextInterceptor, String, Name, Attributes)}.
      */
     void add( String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, int, Attributes)}.
      */
     void modify( Name name, int modOp, Attributes attributes ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#modify(NextInterceptor, Name, ModificationItem[])}.
      */
     void modify( Name name, ModificationItem[] items ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#list(NextInterceptor, Name)}.
      */
     NamingEnumeration list( Name baseName ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#search(NextInterceptor, Name, Map, ExprNode, SearchControls)}.
      */
-    NamingEnumeration search( Name baseName, Map environment, ExprNode filter,
-                              SearchControls searchControls ) throws NamingException;
+    NamingEnumeration search( Name baseName, Map environment, ExprNode filter, SearchControls searchControls )
+        throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor, Name)}.
      */
     Attributes lookup( Name name ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#lookup(NextInterceptor, Name, String[])}.
      */
-    Attributes lookup( Name name, String [] attrIds ) throws NamingException;
+    Attributes lookup( Name name, String[] attrIds ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#hasEntry(NextInterceptor, Name)}.
      */
     boolean hasEntry( Name name ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#isSuffix(NextInterceptor, Name)}.
      */
     boolean isSuffix( Name name ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#modifyRn(NextInterceptor, Name, String, boolean)}.
      */
     void modifyRn( Name name, String newRn, boolean deleteOldRn ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name)}.
      */
     void move( Name oldName, Name newParentName ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#move(NextInterceptor, Name, Name, String, boolean)}.
      */
-    void move( Name oldName, Name newParentName, String newRn,
-               boolean deleteOldRn ) throws NamingException;
+    void move( Name oldName, Name newParentName, String newRn, boolean deleteOldRn ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#bind(NextInterceptor, Name, byte[], List, String)
      */
     void bind( Name bindDn, byte[] credentials, List mechanisms, String saslAuthId ) throws NamingException;
+
+
     /**
      * Calls the next interceptor's {@link Interceptor#unbind(NextInterceptor, Name)
      */

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/invocation/Invocation.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/invocation/Invocation.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/invocation/Invocation.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/invocation/Invocation.java Fri Feb 10 02:48:07 2006
@@ -49,7 +49,7 @@
      * @param caller the JNDI {@link Context} that made this invocation
      * @param name the name of the called method
      */
-    public Invocation( DirectoryPartitionNexusProxy proxy, Context caller, String name )
+    public Invocation(DirectoryPartitionNexusProxy proxy, Context caller, String name)
     {
         this( proxy, caller, name, null, Collections.EMPTY_SET );
     }
@@ -62,7 +62,7 @@
      * @param name the name of the called method
      * @param parameters the array of parameters passed to the called method
      */
-    public Invocation( DirectoryPartitionNexusProxy proxy, Context caller, String name, Object[] parameters )
+    public Invocation(DirectoryPartitionNexusProxy proxy, Context caller, String name, Object[] parameters)
     {
         this( proxy, caller, name, parameters, Collections.EMPTY_SET );
     }
@@ -76,25 +76,25 @@
      * @param parameters the array of parameters passed to the called method
      * @param bypassed the set of bypassed Interceptor names
      */
-    public Invocation( DirectoryPartitionNexusProxy proxy, Context caller, String name, Object[] parameters,
-                       Collection bypassed )
+    public Invocation(DirectoryPartitionNexusProxy proxy, Context caller, String name, Object[] parameters,
+        Collection bypassed)
     {
-        if( proxy == null )
+        if ( proxy == null )
         {
             throw new NullPointerException( "proxy" );
         }
-        if( caller == null )
+        if ( caller == null )
         {
             throw new NullPointerException( "caller" );
         }
-        if( name == null )
+        if ( name == null )
         {
             throw new NullPointerException( "name" );
         }
 
-        if( parameters == null )
+        if ( parameters == null )
         {
-            parameters = new Object[ 0 ];
+            parameters = new Object[0];
         }
 
         if ( bypassed == null )
@@ -111,9 +111,9 @@
         this.name = name;
 
         List paramList = new ArrayList();
-        for( int i = 0; i < parameters.length; i++ )
+        for ( int i = 0; i < parameters.length; i++ )
         {
-            paramList.add( parameters[ i ] );
+            paramList.add( parameters[i] );
         }
 
         this.parameters = Collections.unmodifiableList( paramList );

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/invocation/InvocationStack.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/invocation/InvocationStack.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/invocation/InvocationStack.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/invocation/InvocationStack.java Fri Feb 10 02:48:07 2006
@@ -43,7 +43,8 @@
     // It seems like JDK 1.5 supports explicit release by introducing
     // <tt>ThreadLocal.remove()</tt>, but we're still targetting 1.4.
     private static final Map stacks = new IdentityHashMap();
-    
+
+
     /**
      * Returns the invocation stack of current thread.
      */
@@ -51,10 +52,10 @@
     {
         Thread currentThread = Thread.currentThread();
         InvocationStack ctx;
-        synchronized( stacks )
+        synchronized ( stacks )
         {
             ctx = ( InvocationStack ) stacks.get( currentThread );
-            if( ctx == null )
+            if ( ctx == null )
             {
                 ctx = new InvocationStack();
             }
@@ -65,6 +66,7 @@
     private final Thread thread;
     private final List stack = new ArrayList();
 
+
     private InvocationStack()
     {
         Thread currentThread = Thread.currentThread();
@@ -72,18 +74,20 @@
         // This operation is already synchronized from getInstance()
         stacks.put( currentThread, this );
     }
-    
+
+
     /**
      * Returns an array of {@link Invocation}s.  0th element is the
      * latest invocation.
      */
     public Invocation[] toArray()
     {
-        Invocation[] result = new Invocation[ stack.size() ];
+        Invocation[] result = new Invocation[stack.size()];
         result = ( Invocation[] ) stack.toArray( result );
         return result;
     }
-    
+
+
     /**
      * Returns the latest invocation.
      */
@@ -92,6 +96,7 @@
         return ( Invocation ) this.stack.get( 0 );
     }
 
+
     /**
      * Returns true if the stack is empty false otherwise.
      */
@@ -100,6 +105,7 @@
         return this.stack.isEmpty();
     }
 
+
     /**
      * Pushes the specified invocation to this stack.
      */
@@ -107,7 +113,8 @@
     {
         this.stack.add( 0, invocation );
     }
-    
+
+
     /**
      * Pops the latest invocation from this stack.  This stack is released
      * automatically if you pop all items from this stack.
@@ -115,9 +122,9 @@
     public Invocation pop()
     {
         Invocation invocation = ( Invocation ) this.stack.remove( 0 );
-        if( this.stack.size() == 0 )
+        if ( this.stack.size() == 0 )
         {
-            synchronized( stacks )
+            synchronized ( stacks )
             {
                 stacks.remove( thread );
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/AbstractContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/AbstractContextFactory.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/AbstractContextFactory.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/AbstractContextFactory.java Fri Feb 10 02:48:07 2006
@@ -76,7 +76,8 @@
     protected AbstractContextFactory()
     {
     }
-    
+
+
     public final synchronized Context getInitialContext( Hashtable env ) throws NamingException
     {
         Configuration cfg = Configuration.toConfiguration( env );
@@ -89,59 +90,60 @@
         DirectoryService service = DirectoryService.getInstance( cfg.getInstanceId() );
 
         // Execute configuration
-        if( cfg instanceof ShutdownConfiguration )
+        if ( cfg instanceof ShutdownConfiguration )
         {
             service.shutdown();
         }
-        else if( cfg instanceof SyncConfiguration )
+        else if ( cfg instanceof SyncConfiguration )
         {
             service.sync();
         }
-        else if( cfg instanceof StartupConfiguration )
+        else if ( cfg instanceof StartupConfiguration )
         {
             service.startup( this, env );
         }
-        else if( cfg instanceof AddDirectoryPartitionConfiguration )
+        else if ( cfg instanceof AddDirectoryPartitionConfiguration )
         {
-            new DirectoryPartitionNexusProxy(
-                    service.getJndiContext( principal, credential, authentication, "" ),
-                    service).addContextPartition( ( ( AddDirectoryPartitionConfiguration ) cfg ).getDirectoryPartitionConfiguration() );
+            new DirectoryPartitionNexusProxy( service.getJndiContext( principal, credential, authentication, "" ),
+                service ).addContextPartition( ( ( AddDirectoryPartitionConfiguration ) cfg )
+                .getDirectoryPartitionConfiguration() );
         }
-        else if( cfg instanceof RemoveDirectoryPartitionConfiguration )
+        else if ( cfg instanceof RemoveDirectoryPartitionConfiguration )
         {
-            new DirectoryPartitionNexusProxy(
-                    service.getJndiContext( principal, credential, authentication, "" ),
-                    service).removeContextPartition( ( ( RemoveDirectoryPartitionConfiguration ) cfg ).getSuffix() );
+            new DirectoryPartitionNexusProxy( service.getJndiContext( principal, credential, authentication, "" ),
+                service ).removeContextPartition( ( ( RemoveDirectoryPartitionConfiguration ) cfg ).getSuffix() );
         }
-        else if( service == null )
+        else if ( service == null )
         {
             throw new NamingException( "Unknown configuration: " + cfg );
         }
-        
+
         return service.getJndiContext( principal, credential, authentication, providerUrl );
     }
 
+
     public static String getProviderUrl( Hashtable env )
     {
         String providerUrl;
         Object value;
         value = env.get( Context.PROVIDER_URL );
-        if( value == null )
+        if ( value == null )
         {
             value = "";
         }
         providerUrl = value.toString();
-        
+
         env.put( Context.PROVIDER_URL, providerUrl );
-        
+
         return providerUrl;
     }
 
+
     public static String getAuthentication( Hashtable env )
     {
         String authentication;
         Object value = env.get( Context.SECURITY_AUTHENTICATION );
-        if( value == null )
+        if ( value == null )
         {
             authentication = "none";
         }
@@ -149,25 +151,26 @@
         {
             authentication = value.toString();
         }
-        
+
         env.put( Context.SECURITY_AUTHENTICATION, authentication );
-        
+
         return authentication;
     }
 
+
     public static byte[] getCredential( Hashtable env ) throws ConfigurationException
     {
         byte[] credential;
         Object value = env.get( Context.SECURITY_CREDENTIALS );
-        if( value == null )
+        if ( value == null )
         {
             credential = null;
         }
-        else if( value instanceof String )
+        else if ( value instanceof String )
         {
             credential = ( ( String ) value ).getBytes();
         }
-        else if( value instanceof byte[] )
+        else if ( value instanceof byte[] )
         {
             credential = ( byte[] ) value;
         }
@@ -175,8 +178,8 @@
         {
             throw new ConfigurationException( "Can't convert '" + Context.SECURITY_CREDENTIALS + "' to byte[]." );
         }
-        
-        if( credential != null )
+
+        if ( credential != null )
         {
             env.put( Context.SECURITY_CREDENTIALS, credential );
         }
@@ -184,11 +187,12 @@
         return credential;
     }
 
+
     public static String getPrincipal( Hashtable env )
     {
         String principal;
         Object value = env.get( Context.SECURITY_PRINCIPAL );
-        if( value == null )
+        if ( value == null )
         {
             principal = null;
         }
@@ -197,7 +201,7 @@
             principal = value.toString();
             env.put( Context.SECURITY_PRINCIPAL, principal );
         }
-        
+
         return principal;
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.directory.server.core.jndi;
 
+
 import javax.naming.NamingException;
 import javax.naming.spi.InitialContextFactory;
 
@@ -39,6 +40,7 @@
     {
     }
 
+
     /**
      * Does nothing by default.
      */
@@ -46,33 +48,38 @@
     {
     }
 
+
     /**
      * Does nothing by default.
      */
     public void afterStartup( DirectoryService service ) throws NamingException
     {
     }
-    
+
+
     /**
      * Does nothing by default.
      */
     public void beforeShutdown( DirectoryService service ) throws NamingException
     {
     }
-    
+
+
     /**
      * Does nothing by default.
      */
     public void afterShutdown( DirectoryService service ) throws NamingException
     {
     }
-    
+
+
     /**
      * Does nothing by default.
      */
     public void beforeSync( DirectoryService service ) throws NamingException
     {
     }
+
 
     /**
      * Does nothing by default.

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java Fri Feb 10 02:48:07 2006
@@ -52,8 +52,8 @@
  */
 public class DeadContext implements LdapContext, EventDirContext
 {
-    private final String EXCEPTION_MSG = "Context operation unavailable when " +
-            "invoked after Eve provider has been shutdown";
+    private final String EXCEPTION_MSG = "Context operation unavailable when "
+        + "invoked after Eve provider has been shutdown";
 
 
     public Control[] getConnectControls() throws NamingException
@@ -218,13 +218,15 @@
     }
 
 
-    public NamingEnumeration search( String name, Attributes matchingAttributes, String[] attributesToReturn ) throws NamingException
+    public NamingEnumeration search( String name, Attributes matchingAttributes, String[] attributesToReturn )
+        throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE );
     }
 
 
-    public NamingEnumeration search( Name name, Attributes matchingAttributes, String[] attributesToReturn ) throws NamingException
+    public NamingEnumeration search( Name name, Attributes matchingAttributes, String[] attributesToReturn )
+        throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE );
     }
@@ -242,13 +244,15 @@
     }
 
 
-    public NamingEnumeration search( String name, String filterExpr, Object[] filterArgs, SearchControls cons ) throws NamingException
+    public NamingEnumeration search( String name, String filterExpr, Object[] filterArgs, SearchControls cons )
+        throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE );
     }
 
 
-    public NamingEnumeration search( Name name, String filterExpr, Object[] filterArgs, SearchControls cons ) throws NamingException
+    public NamingEnumeration search( Name name, String filterExpr, Object[] filterArgs, SearchControls cons )
+        throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE );
     }
@@ -429,25 +433,28 @@
 
 
     public void addNamingListener( Name name, String s, SearchControls searchControls, NamingListener namingListener )
-            throws NamingException
+        throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE );
     }
 
 
-    public void addNamingListener( String s, String s1, SearchControls searchControls, NamingListener namingListener ) throws NamingException
+    public void addNamingListener( String s, String s1, SearchControls searchControls, NamingListener namingListener )
+        throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE );
     }
 
 
-    public void addNamingListener( Name name, String s, Object[] objects, SearchControls searchControls, NamingListener namingListener ) throws NamingException
+    public void addNamingListener( Name name, String s, Object[] objects, SearchControls searchControls,
+        NamingListener namingListener ) throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE );
     }
 
 
-    public void addNamingListener( String s, String s1, Object[] objects, SearchControls searchControls, NamingListener namingListener ) throws NamingException
+    public void addNamingListener( String s, String s1, Object[] objects, SearchControls searchControls,
+        NamingListener namingListener ) throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE );
     }



Mime
View raw message