directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r723036 - in /directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core: authn/ authz/ authz/support/ exception/ interceptor/context/ partition/ schema/
Date Wed, 03 Dec 2008 19:50:09 GMT
Author: elecharny
Date: Wed Dec  3 11:50:08 2008
New Revision: 723036

URL: http://svn.apache.org/viewvc?rev=723036&view=rev
Log:
Replaced tabs by 4 spaces

Modified:
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Wed Dec  3 11:50:08 2008
@@ -440,9 +440,9 @@
         
         if ( level == AuthenticationLevel.UNAUTHENT )
         {
-        	// This is a case where the Bind request contains a DN, but no password.
-        	// We don't check the DN, we just return a UnwillingToPerform error
-        	throw new LdapOperationNotSupportedException( "Cannot Bind for DN " + opContext.getDn().getUpName(),
ResultCodeEnum.UNWILLING_TO_PERFORM );
+            // This is a case where the Bind request contains a DN, but no password.
+            // We don't check the DN, we just return a UnwillingToPerform error
+            throw new LdapOperationNotSupportedException( "Cannot Bind for DN " + opContext.getDn().getUpName(),
ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
 
         Collection<Authenticator> authenticators = getAuthenticators( level.getName()
);

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
Wed Dec  3 11:50:08 2008
@@ -566,9 +566,9 @@
 
             if ( userEntry == null )
             {
-            	LdapDN dn = opContext.getDn();
-            	String upDn = ( dn == null ? "" : dn.getUpName() );
-            	
+            LdapDN dn = opContext.getDn();
+            String upDn = ( dn == null ? "" : dn.getUpName() );
+            
                 throw new LdapAuthenticationException( "Failed to lookup user for authentication:
" 
                     + upDn );
             }

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
Wed Dec  3 11:50:08 2008
@@ -1048,9 +1048,9 @@
 
     public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws
Exception
     {
-    	LdapDN name = opContext.getDn();
-    	String oid = opContext.getOid();
-    	Value<?> value = ( Value<?> ) opContext.getValue();
+        LdapDN name = opContext.getDn();
+        String oid = opContext.getOid();
+        Value<?> value = ( Value<?> ) opContext.getValue();
 
         ClonedServerEntry entry = opContext.lookup( name, ByPassConstants.LOOKUP_BYPASS );
 

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
Wed Dec  3 11:50:08 2008
@@ -46,9 +46,9 @@
 {
     public Collection<ACITuple> filter( 
             Registries registries, 
-	    Collection<ACITuple> tuples, 
-	    OperationScope scope, 
-	    OperationContext opContext,
+            Collection<ACITuple> tuples, 
+            OperationScope scope, 
+            OperationContext opContext,
             Collection<LdapDN> userGroupNames, 
             LdapDN userName, 
             ServerEntry userEntry, 

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
Wed Dec  3 11:50:08 2008
@@ -534,7 +534,7 @@
         try
         {
             EntryFilteringCursor cursor =  nextInterceptor.search( opContext );
-	        
+            
             if ( ! cursor.next() )
             {
                 if ( !base.isEmpty() && !( subschemSubentryDn.toNormName() ).equalsIgnoreCase(
base.toNormName() ) )

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/BindOperationContext.java
Wed Dec  3 11:50:08 2008
@@ -109,27 +109,27 @@
     {
         if ( ( saslMechanism == null ) )
         {
-        	if ( dn.isEmpty() )
-        	{
-        		if ( StringTools.isEmpty( credentials ) )
-        		{
-        			// Dn and Credentials are empty, this is an anonymous authent
-        			return AuthenticationLevel.NONE;
-        		}
-        		else
-        		{
-        			// If we have a password but no DN, this is invalid 
-        			return AuthenticationLevel.INVALID;
-        		}
-        	}
-        	else if ( StringTools.isEmpty( credentials ) )
-        	{
-        		return AuthenticationLevel.UNAUTHENT;
-        	}
-        	else
-        	{
-        		return AuthenticationLevel.SIMPLE;
-        	}
+            if ( dn.isEmpty() )
+            {
+                if ( StringTools.isEmpty( credentials ) )
+                {
+                    // Dn and Credentials are empty, this is an anonymous authent
+                    return AuthenticationLevel.NONE;
+                }
+                else
+                {
+                    // If we have a password but no DN, this is invalid 
+                    return AuthenticationLevel.INVALID;
+                }
+            }
+            else if ( StringTools.isEmpty( credentials ) )
+            {
+                return AuthenticationLevel.UNAUTHENT;
+            }
+            else
+            {
+                return AuthenticationLevel.SIMPLE;
+            }
         }
         else
         {

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/CompareOperationContext.java
Wed Dec  3 11:50:08 2008
@@ -54,7 +54,7 @@
      */
     public CompareOperationContext( CoreSession session )
     {
-    	super( session );
+        super( session );
     }
 
     
@@ -76,7 +76,7 @@
      */
     public CompareOperationContext( CoreSession session, String oid )
     {
-    	super( session );
+        super( session );
         this.oid = oid;
     }
 
@@ -88,7 +88,7 @@
      */
     public CompareOperationContext( CoreSession session, LdapDN dn, String oid )
     {
-    	super( session, dn );
+        super( session, dn );
         this.oid = oid;
     }
 
@@ -100,7 +100,7 @@
      */
     public CompareOperationContext( CoreSession session, LdapDN dn, String oid, Value<?>
value )
     {
-    	super( session, dn );
+        super( session, dn );
         this.oid = oid;
         this.value = value;
     }
@@ -132,7 +132,7 @@
         return oid;
     }
 
-	
+    
     /**
      * Set the compared OID
      * @param oid The compared OID
@@ -142,7 +142,7 @@
         this.oid = oid;
     }
 
-	
+    
     /**
      * @return The value to compare
      */
@@ -151,7 +151,7 @@
         return value;
     }
 
-	
+    
     /**
      * Set the value to compare
      * @param value The value to compare

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java
Wed Dec  3 11:50:08 2008
@@ -56,7 +56,7 @@
      */
     public LookupOperationContext( CoreSession session )
     {
-    	super( session );
+        super( session );
     }
     
 

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java
Wed Dec  3 11:50:08 2008
@@ -47,7 +47,7 @@
      */
     public MoveAndRenameOperationContext( CoreSession session )
     {
-    	super( session );
+        super( session );
     }
 
 

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
Wed Dec  3 11:50:08 2008
@@ -45,7 +45,7 @@
      */
     public MoveOperationContext( CoreSession session )
     {
-    	super( session );
+        super( session );
     }
     
 

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameOperationContext.java
Wed Dec  3 11:50:08 2008
@@ -58,7 +58,7 @@
      */
     public RenameOperationContext( CoreSession session )
     {
-    	super( session );
+        super( session );
     }
 
 

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Wed Dec  3 11:50:08 2008
@@ -649,7 +649,7 @@
      */
     public synchronized void removeContextPartition( RemoveContextPartitionOperationContext
removeContextPartition ) throws Exception
     {
-    	// Get the Partition name. It's a DN.
+        // Get the Partition name. It's a DN.
         String key = removeContextPartition.getDn().getNormName();
         
         // Retrieve this partition from the aprtition's table

Modified: directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=723036&r1=723035&r2=723036&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Wed Dec  3 11:50:08 2008
@@ -1745,65 +1745,65 @@
     
     private void checkOcSuperior( ServerEntry entry ) throws Exception
     {
-    	ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();
-    	
+        ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();
+        
         // handle the m-supObjectClass meta attribute
         EntryAttribute supOC = entry.get( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT );
         
         if ( supOC != null )
         {
-        	ObjectClassTypeEnum ocType = ObjectClassTypeEnum.STRUCTURAL;
-        	
+            ObjectClassTypeEnum ocType = ObjectClassTypeEnum.STRUCTURAL;
+            
             if ( entry.get( MetaSchemaConstants.M_TYPE_OBJECT_CLASS_AT ) != null )
             {
                 String type = entry.get( MetaSchemaConstants.M_TYPE_OBJECT_CLASS_AT ).getString();
                 ocType = ObjectClassTypeEnum.getClassType( type );
             }
-        	
-        	// First check that the inheritence scheme is correct.
-        	// 1) If the ocType is ABSTRACT, it should not have any other SUP not ABSTRACT
-        	for ( Value<?> sup:supOC )
-        	{
-        		try
-        		{
-        			String supName = (String)sup.get();
-        			
-            		ObjectClass superior = ocRegistry.lookup( supName );
-
-            		switch ( ocType )
-            		{
-	            		case ABSTRACT :
-	                		if ( !superior.isAbstract() )
-	                		{
-	                			String message = "An ABSTRACT ObjectClass cannot inherit from an objectClass
which is not ABSTRACT";
-	                			LOG.error( message );
-	                			throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
-	                		}
-	                		
-	                		break;
-	
-	            		case AUXILIARY :
-	                		if ( !superior.isAbstract() && ! superior.isAuxiliary() )
-	                		{
-	                			String message = "An AUXILiARY ObjectClass cannot inherit from an objectClass
which is not ABSTRACT or AUXILIARY";
-	                			LOG.error( message );
-	                			throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
-	                		}
-	                		
-	                		break;
-
-	            		case STRUCTURAL :
-	                		break;
-            		}
-        		}
-        		catch ( NamingException ne )
-        		{
-        			// The superior OC does not exist : this is an error
-        			String message = "Cannot have a superior which does not exist";
-        			LOG.error( message );
-        			throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
-        		}
-        	}
+            
+            // First check that the inheritence scheme is correct.
+            // 1) If the ocType is ABSTRACT, it should not have any other SUP not ABSTRACT
+            for ( Value<?> sup:supOC )
+            {
+                try
+                {
+                    String supName = (String)sup.get();
+                    
+                    ObjectClass superior = ocRegistry.lookup( supName );
+
+                    switch ( ocType )
+                    {
+                        case ABSTRACT :
+                            if ( !superior.isAbstract() )
+                            {
+                                String message = "An ABSTRACT ObjectClass cannot inherit
from an objectClass which is not ABSTRACT";
+                                LOG.error( message );
+                                throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
+                            }
+                            
+                            break;
+    
+                        case AUXILIARY :
+                            if ( !superior.isAbstract() && ! superior.isAuxiliary()
)
+                            {
+                                String message = "An AUXILiARY ObjectClass cannot inherit
from an objectClass which is not ABSTRACT or AUXILIARY";
+                                LOG.error( message );
+                                throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
+                            }
+                            
+                            break;
+
+                        case STRUCTURAL :
+                            break;
+                    }
+                }
+                catch ( NamingException ne )
+                {
+                    // The superior OC does not exist : this is an error
+                    String message = "Cannot have a superior which does not exist";
+                    LOG.error( message );
+                    throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
+                }
+            }
         }
     }
 



Mime
View raw message