You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/01/14 19:26:29 UTC

svn commit: r1059098 - in /directory/apacheds/branches/apacheds-AP: core-annotations/ core-api/ core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/partition/ core-avl/ core/ core/src/main/ja...

Author: elecharny
Date: Fri Jan 14 18:26:28 2011
New Revision: 1059098

URL: http://svn.apache.org/viewvc?rev=1059098&view=rev
Log:
Merged back the trunk into my branch

Modified:
    directory/apacheds/branches/apacheds-AP/core/   (props changed)
    directory/apacheds/branches/apacheds-AP/core-annotations/   (props changed)
    directory/apacheds/branches/apacheds-AP/core-api/   (props changed)
    directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java   (contents, props changed)
    directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/apacheds/branches/apacheds-AP/core-avl/   (props changed)
    directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java

Propchange: directory/apacheds/branches/apacheds-AP/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:26:28 2011
@@ -3,4 +3,4 @@
 /directory/apacheds/branches/apacheds-config/core:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core:980138-980934
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core:1040956-1043765
-/directory/apacheds/trunk/core:1049007-1056375
+/directory/apacheds/trunk/core:1049007-1059081

Propchange: directory/apacheds/branches/apacheds-AP/core-annotations/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:26:28 2011
@@ -3,3 +3,4 @@
 /directory/apacheds/branches/apacheds-config/core-annotations:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-annotations:980138-980934
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-annotations:1040956-1043765
+/directory/apacheds/trunk/core-annotations:1049007-1059082

Propchange: directory/apacheds/branches/apacheds-AP/core-api/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:26:28 2011
@@ -2,3 +2,4 @@
 /directory/apacheds/branches/apacheds-config/core-api:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-api:980138-980934
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-api:1040956-1043765
+/directory/apacheds/trunk/core-api:1049007-1059082

Modified: directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java?rev=1059098&r1=1059097&r2=1059098&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java (original)
+++ directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java Fri Jan 14 18:26:28 2011
@@ -49,7 +49,7 @@ public class PasswordPolicyConfiguration
      *  Default value is 0, does not expire.  If not 0, the value must be greater than or equal
      *  to the value of the pwdMinAge.
      */
-    private int pwdMaxAge;
+    private int pwdMaxAge = 0;
 
     /**
      *  specifies the maximum number of used passwords stored in the pwdHistory attribute.
@@ -97,7 +97,7 @@ public class PasswordPolicyConfiguration
      * consecutive failed bind attempts. The maximum number of consecutive
      * failed bind attempts is specified in {@link #pwdMaxFailure}
      */
-    private boolean pwdLockout;
+    private boolean pwdLockout = false;
 
     /**
      * the number of seconds that the password cannot be used to authenticate due to 
@@ -111,13 +111,13 @@ public class PasswordPolicyConfiguration
      * be used to authenticate.
      * Default value is 0, no limit on the number of authentication failures
      */
-    private int pwdMaxFailure;
+    private int pwdMaxFailure = 0;
 
     /**
      * the number of seconds after which the password failures are purged from the failure counter.
      * Default value is 0, reset all pwdFailureTimes after a successful authentication.
      */
-    private int pwdFailureCountInterval;
+    private int pwdFailureCountInterval = 0;
 
     /** 
      * flag to indicate if the password must be changed by the user after they bind to the 
@@ -143,13 +143,13 @@ public class PasswordPolicyConfiguration
     private int pwdMinDelay = 0;
 
     /** the maximum number of seconds to delay when responding to a failed authentication attempt.*/
-    private int pwdMaxDelay;
+    private int pwdMaxDelay = 0;
 
     /** 
      * the number of seconds an account may remain unused before it becomes locked
      * Default value is 0, no check for idle time.
      */
-    private int pwdMaxIdle;
+    private int pwdMaxIdle = 0;
 
 
     public String getPwdAttribute()
@@ -473,7 +473,7 @@ public class PasswordPolicyConfiguration
             sb.append( ++errCount ).append( ". password failure count interval time cannot be negative\n" );
         }
 
-        if ( ( ( pwdMinDelay > 0 ) && ( pwdMaxDelay <= 0 ) ) 
+        if ( ( ( pwdMinDelay > 0 ) && ( pwdMaxDelay <= 0 ) )
             || ( ( pwdMaxDelay > 0 ) && ( pwdMinDelay <= 0 ) ) )
         {
             sb

Propchange: directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:26:28 2011
@@ -6,3 +6,4 @@
 /directory/apacheds/branches/apacheds-schema/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyConfiguration.java:806623-896441
 /directory/apacheds/branches/apacheds-subtree/core/src/main/java/org/apache/directory/server/core/authn/PasswordPolicyConfiguration.java:965203-965686
 /directory/apacheds/branches/xdbm-refactoring/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyConfiguration.java:945827-946347
+/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/PasswordPolicyConfiguration.java:1049007-1059082

Modified: directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java?rev=1059098&r1=1059097&r2=1059098&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java (original)
+++ directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java Fri Jan 14 18:26:28 2011
@@ -75,7 +75,7 @@ public abstract class AbstractPartition 
         }
         catch ( Exception e )
         {
-            e.printStackTrace();
+            throw new LdapOtherException( e.getMessage() );
         }
         finally
         {

Propchange: directory/apacheds/branches/apacheds-AP/core-avl/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 14 18:26:28 2011
@@ -2,3 +2,4 @@
 /directory/apacheds/branches/apacheds-config/core-avl:1023442-1029077
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-avl:980138-980934
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-avl:1040956-1043765
+/directory/apacheds/trunk/core-avl:1049007-1059082

Modified: directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1059098&r1=1059097&r2=1059098&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Fri Jan 14 18:26:28 2011
@@ -689,13 +689,13 @@ public class DefaultDirectoryService imp
         list.add( new DefaultAuthorizationInterceptor() );
         list.add( new AdministrativePointInterceptor() );
         list.add( new ExceptionInterceptor() );
-        list.add( new ChangeLogInterceptor() );
         list.add( new OperationalAttributeInterceptor() );
         list.add( new SchemaInterceptor() );
         list.add( new CollectiveAttributeInterceptor() );
         list.add( new SubentryInterceptor() );
         list.add( new EventInterceptor() );
         list.add( new TriggerInterceptor() );
+        list.add( new ChangeLogInterceptor() );
         list.add( new JournalInterceptor() );
 
         setInterceptors( list );

Modified: directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=1059098&r1=1059097&r2=1059098&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java Fri Jan 14 18:26:28 2011
@@ -98,13 +98,11 @@ public class ChangeLogInterceptor extend
     // -----------------------------------------------------------------------
     // Overridden (only change inducing) intercepted methods
     // -----------------------------------------------------------------------
-    
-
     public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
     {
         next.add( addContext );
 
-        if ( ! changeLog.isEnabled() || ! addContext.isFirstOperation() )
+        if ( !changeLog.isEnabled() )
         {
             return;
         }
@@ -143,14 +141,14 @@ public class ChangeLogInterceptor extend
         // must save the entry if change log is enabled
         Entry serverEntry = null;
 
-        if ( changeLog.isEnabled() && deleteContext.isFirstOperation() )
+        if ( changeLog.isEnabled() )
         {
             serverEntry = getAttributes( deleteContext );
         }
 
         next.delete( deleteContext );
 
-        if ( ! changeLog.isEnabled() || ! deleteContext.isFirstOperation() )
+        if ( !changeLog.isEnabled() )
         {
             return;
         }
@@ -220,7 +218,7 @@ public class ChangeLogInterceptor extend
         Modification modification = ServerEntryUtils.getModificationItem( modifyContext.getModItems(), entryDeleted );
         boolean isDelete = ( modification != null );
 
-        if ( ! isDelete && ( changeLog.isEnabled() && modifyContext.isFirstOperation() ) )
+        if ( !isDelete && ( changeLog.isEnabled() ) )
         {
             // @todo make sure we're not putting in operational attributes that cannot be user modified
             serverEntry = getAttributes( modifyContext );
@@ -242,7 +240,6 @@ public class ChangeLogInterceptor extend
         if ( 
             isDelete ||   
             ! changeLog.isEnabled() || 
-            ! modifyContext.isFirstOperation() ||
             
          // if there are no modifications due to stripping out bogus non-
          // existing attributes then we will have no modification items and
@@ -307,7 +304,7 @@ public class ChangeLogInterceptor extend
         // After this point, the entry has been modified. The cloned entry contains
         // the modified entry, the originalEntry has changed
 
-        if ( ! changeLog.isEnabled() || ! renameContext.isFirstOperation() )
+        if ( !changeLog.isEnabled() )
         {
             return;
         }
@@ -330,7 +327,7 @@ public class ChangeLogInterceptor extend
     {
         Entry serverEntry = null;
         
-        if ( changeLog.isEnabled() && moveAndRenameContext.isFirstOperation() )
+        if ( changeLog.isEnabled() )
         {
             // @todo make sure we're not putting in operational attributes that cannot be user modified
             serverEntry = moveAndRenameContext.getOriginalEntry();
@@ -338,7 +335,7 @@ public class ChangeLogInterceptor extend
 
         next.moveAndRename( moveAndRenameContext );
 
-        if ( ! changeLog.isEnabled() || ! moveAndRenameContext.isFirstOperation() )
+        if ( !changeLog.isEnabled() )
         {
             return;
         }
@@ -371,7 +368,7 @@ public class ChangeLogInterceptor extend
     {
         next.move( moveContext );
 
-        if ( ! changeLog.isEnabled() || ! moveContext.isFirstOperation() )
+        if ( !changeLog.isEnabled() )
         {
             return;
         }

Modified: directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=1059098&r1=1059097&r2=1059098&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Fri Jan 14 18:26:28 2011
@@ -1540,14 +1540,15 @@ public class SchemaInterceptor extends B
 
                 if ( ( schema != null ) && schema.isEnabled() )
                 {
-                    String ocName = entry.get( MetaSchemaConstants.M_NAME_AT ).getString();
-                    ObjectClass addedOC = schemaManager.getObjectClassRegistry().lookup( ocName );
+                    EntryAttribute oidAT = entry.get( MetaSchemaConstants.M_OID_AT );                    
+                    String ocOid = oidAT.getString();
+                    
+                    ObjectClass addedOC = schemaManager.getObjectClassRegistry().lookup( ocOid );
                     computeSuperior( addedOC );
                 }
             }
             else if ( entry.contains( OBJECT_CLASS_AT, SchemaConstants.META_ATTRIBUTE_TYPE_OC ) )
             {
-
                 // This is an AttributeType addition
                 next.add( addContext );
             }