directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r541123 [21/25] - in /directory/apacheds/branches/apacheds-sasl-branch: ./ benchmarks/ bootstrap-extract/ bootstrap-extract/src/ bootstrap-extract/src/main/ bootstrap-extract/src/main/java/ bootstrap-extract/src/main/java/org/ bootstrap-ext...
Date Thu, 24 May 2007 00:27:07 GMT
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java Wed May 23 17:26:40 2007
@@ -25,10 +25,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
-
-// this is a jdk 1.5 dep which would make us 1.4 incompatible 
-// reverted to using LdapName for now until a better alt is found
-// import javax.naming.ldap.LdapName;
 import javax.naming.spi.DirStateFactory;
 import javax.naming.spi.DirStateFactory.Result;
 
@@ -53,8 +49,10 @@
 
     /**
      * Creates the action to be used against the embedded ApacheDS DIT.
+     * 
+     * @param entry The {@link PrincipalStoreEntry} to add.
      */
-    public AddPrincipal(PrincipalStoreEntry entry)
+    public AddPrincipal( PrincipalStoreEntry entry )
     {
         this.entry = entry;
     }
@@ -84,22 +82,3 @@
         return null;
     }
 }
-
-/*
- dn: uid=akarasulu, ou=Users, dc=example,dc=com
- cn: Alex Karasulu
- sn: Karasulu
- givenname: Alex
- objectclass: top
- objectclass: person
- objectclass: organizationalPerson
- objectclass: inetOrgPerson
- objectclass: krb5Principal
- objectclass: krb5KDCEntry
- ou: Directory
- ou: Users
- uid: akarasulu
- krb5PrincipalName: akarasulu@EXAMPLE.COM
- krb5KeyVersionNumber: 0
- */
-

Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java Wed May 23 17:26:40 2007
@@ -30,7 +30,6 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchResult;
-import javax.security.auth.kerberos.KerberosKey;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
@@ -52,43 +51,41 @@
 
     /** The Kerberos principal who's password is to be changed. */
     protected KerberosPrincipal principal;
-    /** The new key for the update. */
-    protected KerberosKey newKey;
+    /** The new password for the update. */
+    protected String newPassword;
 
 
     /**
      * Creates the action to be used against the embedded ApacheDS DIT.
+     * 
+     * @param principal The principal to change the password for.
+     * @param newPassword The password to change.
      */
-    public ChangePassword(KerberosPrincipal principal, KerberosKey newKey)
+    public ChangePassword( KerberosPrincipal principal, String newPassword )
     {
         this.principal = principal;
-        this.newKey = newKey;
+        this.newPassword = newPassword;
     }
 
 
-    public Object execute( DirContext ctx, Name searchBaseDn )
+    public Object execute( DirContext ctx, Name searchBaseDn ) throws NamingException
     {
         if ( principal == null )
         {
             return null;
         }
 
-        ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute newKeyAttribute = new AttributeImpl( "krb5key", newKey.getEncoded() );
-        mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, newKeyAttribute );
+        ModificationItemImpl[] mods = new ModificationItemImpl[2];
+        Attribute newPasswordAttribute = new AttributeImpl( "userPassword", newPassword );
+        mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, newPasswordAttribute );
+        Attribute principalAttribute = new AttributeImpl( "krb5PrincipalName", principal.getName() );
+        mods[1] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, principalAttribute );
 
         String dn = null;
 
-        try
-        {
-            dn = search( ctx, principal.getName() );
-            Name rdn = getRelativeName( ctx.getNameInNamespace(), dn );
-            ctx.modifyAttributes( rdn, mods );
-        }
-        catch ( NamingException e )
-        {
-            return null;
-        }
+        dn = search( ctx, principal.getName() );
+        Name rdn = getRelativeName( ctx.getNameInNamespace(), dn );
+        ctx.modifyAttributes( rdn, mods );
 
         return dn;
     }

Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java Wed May 23 17:26:40 2007
@@ -54,8 +54,10 @@
 
     /**
      * Creates the action to be used against the embedded ApacheDS DIT.
+     * 
+     * @param principal The principal to delete.
      */
-    public DeletePrincipal(KerberosPrincipal principal)
+    public DeletePrincipal( KerberosPrincipal principal )
     {
         this.principal = principal;
     }

Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java Wed May 23 17:26:40 2007
@@ -21,23 +21,30 @@
 package org.apache.directory.server.kerberos.shared.store.operations;
 
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
+import javax.naming.directory.InvalidAttributeValueException;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.SamType;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntryModifier;
 import org.apache.directory.server.protocol.shared.store.ContextOperation;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 
 
 /**
@@ -52,11 +59,12 @@
 
     private static final String filter = "(objectClass=krb5Principal)";
 
+
     public Object execute( DirContext ctx, Name searchBaseDn )
     {
         SearchControls controls = new SearchControls();
 
-        List answers = new ArrayList();
+        List<PrincipalStoreEntry> answers = new ArrayList<PrincipalStoreEntry>();
 
         try
         {
@@ -69,7 +77,6 @@
                 SearchResult result = ( SearchResult ) answer.next();
                 attrs = result.getAttributes();
                 PrincipalStoreEntry entry = getEntry( attrs );
-                System.out.println( "Result name is " + result.getName() );
                 answers.add( entry );
             }
 
@@ -103,7 +110,7 @@
         String encryptionType = ( String ) attrs.get( KerberosAttribute.TYPE ).get();
         String keyVersionNumber = ( String ) attrs.get( KerberosAttribute.VERSION ).get();
 
-        String commonName = ( String ) attrs.get( "cn" ).get();
+        String commonName = ( String ) attrs.get( SchemaConstants.CN_AT ).get();
 
         if ( attrs.get( "apacheSamType" ) != null )
         {
@@ -112,13 +119,25 @@
             modifier.setSamType( SamType.getTypeByOrdinal( Integer.parseInt( samType ) ) );
         }
 
-        byte[] keyBytes = ( byte[] ) attrs.get( KerberosAttribute.KEY ).get();
+        if ( attrs.get( KerberosAttribute.KEY ) != null )
+        {
+            Attribute krb5key = attrs.get( KerberosAttribute.KEY );
+            try
+            {
+                Map<EncryptionType, EncryptionKey> keyMap = modifier.reconstituteKeyMap( krb5key );
+                modifier.setKeyMap( keyMap );
+            }
+            catch ( IOException ioe )
+            {
+                throw new InvalidAttributeValueException( "Account Kerberos key attribute '" + KerberosAttribute.KEY
+                    + "' contained an invalid value for krb5key." );
+            }
+        }
 
         modifier.setCommonName( commonName );
         modifier.setPrincipal( new KerberosPrincipal( principal ) );
         modifier.setEncryptionType( Integer.parseInt( encryptionType ) );
         modifier.setKeyVersionNumber( Integer.parseInt( keyVersionNumber ) );
-        modifier.setKey( keyBytes );
 
         return modifier.getEntry();
     }

Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java Wed May 23 17:26:40 2007
@@ -20,17 +20,22 @@
 package org.apache.directory.server.kerberos.shared.store.operations;
 
 
+import java.io.IOException;
 import java.text.ParseException;
+import java.util.Map;
 
 import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InvalidAttributeValueException;
 import javax.naming.directory.SearchResult;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.SamType;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
@@ -57,8 +62,10 @@
 
     /**
      * Creates the action to be used against the embedded ApacheDS DIT.
+     * 
+     * @param principal 
      */
-    public GetPrincipal(KerberosPrincipal principal)
+    public GetPrincipal( KerberosPrincipal principal )
     {
         this.principal = principal;
     }
@@ -77,7 +84,7 @@
 
         String[] attrIDs =
             { KerberosAttribute.PRINCIPAL, KerberosAttribute.VERSION, KerberosAttribute.TYPE, KerberosAttribute.KEY,
-                KerberosAttribute.SAM_TYPE, KerberosAttribute.ACCOUNT_DISABLED, 
+                KerberosAttribute.SAM_TYPE, KerberosAttribute.ACCOUNT_DISABLED,
                 KerberosAttribute.ACCOUNT_EXPIRATION_TIME, KerberosAttribute.ACCOUNT_LOCKEDOUT };
 
         Attributes matchAttrs = new AttributesImpl( true );
@@ -128,28 +135,28 @@
 
         if ( attrs.get( KerberosAttribute.ACCOUNT_DISABLED ) != null )
         {
-            String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_DISABLED ).get(); 
+            String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_DISABLED ).get();
             modifier.setDisabled( "true".equalsIgnoreCase( val ) );
         }
 
         if ( attrs.get( KerberosAttribute.ACCOUNT_LOCKEDOUT ) != null )
         {
-            String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_LOCKEDOUT ).get(); 
+            String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_LOCKEDOUT ).get();
             modifier.setLockedOut( "true".equalsIgnoreCase( val ) );
         }
-        
+
         if ( attrs.get( KerberosAttribute.ACCOUNT_EXPIRATION_TIME ) != null )
         {
-            String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_EXPIRATION_TIME ).get(); 
+            String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_EXPIRATION_TIME ).get();
             try
             {
                 modifier.setExpiration( KerberosTime.getTime( val ) );
             }
             catch ( ParseException e )
             {
-                throw new InvalidAttributeValueException( "Account expiration attribute " +
-                    KerberosAttribute.ACCOUNT_EXPIRATION_TIME 
-                    + " contained an invalid value for generalizedTime: " + val );
+                throw new InvalidAttributeValueException( "Account expiration attribute "
+                    + KerberosAttribute.ACCOUNT_EXPIRATION_TIME + " contained an invalid value for generalizedTime: "
+                    + val );
             }
         }
 
@@ -159,22 +166,24 @@
             modifier.setSamType( SamType.getTypeByOrdinal( Integer.parseInt( samType ) ) );
         }
 
-        Object key = attrs.get( KerberosAttribute.KEY ).get();
-        byte[] keyBytes = null;
-
-        if ( key instanceof String )
+        if ( attrs.get( KerberosAttribute.KEY ) != null )
         {
-            String msg = "JNDI should not return a string for the kerberos key: JNDI property java.naming.ldap.attributes.binary must include the krb5key attribute.";
-            throw new NamingException( msg );
+            Attribute krb5key = attrs.get( KerberosAttribute.KEY );
+            try
+            {
+                Map<EncryptionType, EncryptionKey> keyMap = modifier.reconstituteKeyMap( krb5key );
+                modifier.setKeyMap( keyMap );
+            }
+            catch ( IOException ioe )
+            {
+                throw new InvalidAttributeValueException( "Account Kerberos key attribute '" + KerberosAttribute.KEY
+                    + "' contained an invalid value for krb5key." );
+            }
         }
 
-        keyBytes = ( byte[] ) key;
-        modifier.setKey( keyBytes );
-
         modifier.setPrincipal( new KerberosPrincipal( principal ) );
         modifier.setEncryptionType( Integer.parseInt( encryptionType ) );
         modifier.setKeyVersionNumber( Integer.parseInt( keyVersionNumber ) );
         return modifier.getEntry();
     }
-    
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalObjectFactory.java Wed May 23 17:26:40 2007
@@ -21,16 +21,23 @@
 package org.apache.directory.server.kerberos.shared.store.operations;
 
 
+import java.io.IOException;
 import java.util.Hashtable;
+import java.util.Map;
 
 import javax.naming.Context;
 import javax.naming.Name;
+import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.InvalidAttributeValueException;
 import javax.naming.spi.DirObjectFactory;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntryModifier;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 
 
 /**
@@ -44,21 +51,35 @@
     public Object getObjectInstance( Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs )
         throws Exception
     {
-        if ( attrs == null || attrs.get( "objectClass" ) == null
-            || !attrs.get( "objectClass" ).contains( "krb5KDCEntry" ) )
+        if ( attrs == null || attrs.get( SchemaConstants.OBJECT_CLASS_AT ) == null
+            || !attrs.get( SchemaConstants.OBJECT_CLASS_AT ).contains( "krb5KDCEntry" ) )
         {
             return null;
         }
 
         PrincipalStoreEntryModifier modifier = new PrincipalStoreEntryModifier();
 
-        modifier.setUserId( ( String ) attrs.get( "uid" ).get() );
-        modifier.setCommonName( ( String ) attrs.get( "cn" ).get() );
+        modifier.setUserId( ( String ) attrs.get( SchemaConstants.UID_AT ).get() );
+        modifier.setCommonName( ( String ) attrs.get( SchemaConstants.CN_AT ).get() );
 
         KerberosPrincipal principal = new KerberosPrincipal( ( String ) attrs.get( KerberosAttribute.PRINCIPAL ).get() );
         modifier.setPrincipal( principal );
 
-        modifier.setKey( ( byte[] ) attrs.get( KerberosAttribute.KEY ).get() );
+        if ( attrs.get( KerberosAttribute.KEY ) != null )
+        {
+            Attribute krb5key = attrs.get( KerberosAttribute.KEY );
+            try
+            {
+                Map<EncryptionType, EncryptionKey> keyMap = modifier.reconstituteKeyMap( krb5key );
+                modifier.setKeyMap( keyMap );
+            }
+            catch ( IOException ioe )
+            {
+                throw new InvalidAttributeValueException( "Account Kerberos key attribute '" + KerberosAttribute.KEY
+                    + "' contained an invalid value for krb5key." );
+            }
+        }
+
         modifier.setEncryptionType( Integer.parseInt( ( String ) attrs.get( KerberosAttribute.TYPE ).get() ) );
         modifier.setKeyVersionNumber( Integer.parseInt( ( String ) attrs.get( KerberosAttribute.VERSION ).get() ) );
 

Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/PrincipalStateFactory.java Wed May 23 17:26:40 2007
@@ -21,6 +21,7 @@
 package org.apache.directory.server.kerberos.shared.store.operations;
 
 
+import java.io.IOException;
 import java.util.Hashtable;
 
 import javax.naming.Context;
@@ -28,13 +29,19 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.InvalidAttributeValueException;
 import javax.naming.directory.SchemaViolationException;
 import javax.naming.spi.DirStateFactory;
 
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.io.encoder.EncryptionKeyEncoder;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
 
 
 /**
@@ -62,27 +69,28 @@
             }
 
             // process the objectClass attribute
-            Attribute oc = outAttrs.get( "objectClass" );
+            Attribute oc = outAttrs.get( SchemaConstants.OBJECT_CLASS_AT );
 
             if ( oc == null )
             {
-                oc = new AttributeImpl( "objectClass" );
+                oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
                 outAttrs.put( oc );
             }
 
-            if ( !oc.contains( "top" ) )
+            if ( !AttributeUtils.containsValueCaseIgnore( oc, SchemaConstants.TOP_OC ) )
             {
-                oc.add( "top" );
+                oc.add( SchemaConstants.TOP_OC );
             }
 
             PrincipalStoreEntry p = ( PrincipalStoreEntry ) obj;
 
-            if ( !oc.contains( "uidObject" ) )
+            if ( !AttributeUtils.containsValueCaseIgnore( oc, SchemaConstants.UID_OBJECT_AT ) )
             {
-                oc.add( "uidObject" );
+                oc.add( SchemaConstants.UID_OBJECT_AT );
+
                 if ( p.getUserId() != null )
                 {
-                    outAttrs.put( "uid", p.getUserId() );
+                    outAttrs.put( SchemaConstants.UID_AT, p.getUserId() );
                 }
                 else
                 {
@@ -90,29 +98,32 @@
                 }
             }
 
-            if ( !oc.contains( "extensibleObject" ) )
+            if ( !AttributeUtils.containsValueCaseIgnore( oc, SchemaConstants.EXTENSIBLE_OBJECT_OC ) )
             {
-                oc.add( "extensibleObject" );
+                oc.add( SchemaConstants.EXTENSIBLE_OBJECT_OC );
                 outAttrs.put( "apacheSamType", "7" );
             }
 
-            if ( !oc.contains( "person" ) )
+            if ( !( AttributeUtils.containsValueCaseIgnore( oc, SchemaConstants.PERSON_OC ) || oc
+                .contains( SchemaConstants.PERSON_OC_OID ) ) )
             {
-                oc.add( "person" );
+                oc.add( SchemaConstants.PERSON_OC );
 
                 // TODO - look into adding sn, gn, and cn to ServerProfiles
-                outAttrs.put( "sn", p.getUserId() );
-                outAttrs.put( "cn", p.getCommonName() );
+                outAttrs.put( SchemaConstants.SN_AT, p.getUserId() );
+                outAttrs.put( SchemaConstants.CN_AT, p.getCommonName() );
             }
 
-            if ( !oc.contains( "organizationalPerson" ) )
+            if ( !( AttributeUtils.containsValueCaseIgnore( oc, SchemaConstants.ORGANIZATIONAL_PERSON_OC ) || oc
+                .contains( SchemaConstants.ORGANIZATIONAL_PERSON_OC_OID ) ) )
             {
-                oc.add( "organizationalPerson" );
+                oc.add( SchemaConstants.ORGANIZATIONAL_PERSON_OC );
             }
 
-            if ( !oc.contains( "inetOrgPerson" ) )
+            if ( !( AttributeUtils.containsValueCaseIgnore( oc, SchemaConstants.INET_ORG_PERSON_OC ) || oc
+                .contains( SchemaConstants.INET_ORG_PERSON_OC_OID ) ) )
             {
-                oc.add( "inetOrgPerson" );
+                oc.add( SchemaConstants.INET_ORG_PERSON_OC );
             }
 
             if ( !oc.contains( "krb5Principal" ) )
@@ -125,25 +136,31 @@
                 oc.add( "krb5KDCEntry" );
 
                 String principal = p.getPrincipal().getName();
-                byte[] keyBytes = p.getEncryptionKey().getKeyValue();
-                int keyType = p.getEncryptionKey().getKeyType().getOrdinal();
-                int keyVersion = p.getEncryptionKey().getKeyVersion();
+
+                EncryptionKey encryptionKey = p.getKeyMap().get( EncryptionType.DES_CBC_MD5 );
+
+                try
+                {
+                    outAttrs.put( KerberosAttribute.KEY, EncryptionKeyEncoder.encode( encryptionKey ) );
+                }
+                catch ( IOException ioe )
+                {
+                    throw new InvalidAttributeValueException( "Unable to encode Kerberos key." );
+                }
+
+                int keyType = encryptionKey.getKeyType().getOrdinal();
+                int keyVersion = encryptionKey.getKeyVersion();
 
                 outAttrs.put( KerberosAttribute.PRINCIPAL, principal );
-                outAttrs.put( KerberosAttribute.KEY, keyBytes );
                 outAttrs.put( KerberosAttribute.TYPE, Integer.toString( keyType ) );
                 outAttrs.put( KerberosAttribute.VERSION, Integer.toString( keyVersion ) );
             }
 
             Result r = new Result( obj, outAttrs );
 
-            System.out.println( "Result from obj " + obj );
-            System.out.println( "Result attrs " + outAttrs );
-
             return r;
         }
 
-        System.out.println( "ERROR:  entry was not correct type " + obj );
         return null;
     }
 

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/pom.xml?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/pom.xml (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/pom.xml Wed May 23 17:26:40 2007
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>build</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
   </parent>
   <artifactId>mitosis</artifactId>
   <name>ApacheDS replication</name>

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/common/Constants.java Wed May 23 17:26:40 2007
@@ -56,12 +56,6 @@
     public static final String ENTRY_DELETED = "entryDeleted";
     
     /**
-     * The OID of <tt>objectClass</tt> class.
-     */
-    public static final String OBJECT_CLASS_OID = "2.5.4.0";
-
-    
-    /**
      * A {@link SearchResultFilter} that filters out the entries whose
      * {@link #ENTRY_DELETED} attribute is <tt>true</tt>.
      */

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddAttributeOperation.java Wed May 23 17:26:40 2007
@@ -25,8 +25,10 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.mitosis.common.CSN;
 
@@ -62,6 +64,7 @@
     {
         Attributes attrs = new AttributesImpl( true );
         attrs.put( getAttribute() );
-        nexus.modify( getName(), DirContext.ADD_ATTRIBUTE, attrs );
+        ModificationItemImpl[] items = ModifyOperationContext.createModItems( attrs, DirContext.ADD_ATTRIBUTE );
+        nexus.modify( new ModifyOperationContext( getName(), items ) );
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/AddEntryOperation.java Wed May 23 17:26:40 2007
@@ -28,6 +28,10 @@
 import org.apache.directory.mitosis.common.CSN;
 import org.apache.directory.mitosis.operation.support.EntryUtil;
 import org.apache.directory.mitosis.store.ReplicationStore;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -77,10 +81,12 @@
         {
             return;
         }
+        
         EntryUtil.createGlueEntries( nexus, normalizedName, false );
 
         // Replace the entry if an entry with the same name exists.
-        Attributes oldEntry = nexus.lookup( normalizedName );
+        Attributes oldEntry = nexus.lookup( new LookupOperationContext( normalizedName ) );
+        
         if ( oldEntry != null )
         {
             recursiveDelete( nexus, normalizedName, registry );
@@ -92,7 +98,7 @@
         // when we put a new one.
         entry.remove( NamespaceTools.getRdnAttribute( rdn ) );
         entry.put( NamespaceTools.getRdnAttribute( rdn ), NamespaceTools.getRdnValue( rdn ) );
-        nexus.add( normalizedName, entry );
+        nexus.add( new AddOperationContext( normalizedName, entry ) );
     }
 
 
@@ -100,10 +106,10 @@
     private void recursiveDelete( PartitionNexus nexus, LdapDN normalizedName, AttributeTypeRegistry registry )
         throws NamingException
     {
-        NamingEnumeration<SearchResult> ne = nexus.list( normalizedName );
+        NamingEnumeration<SearchResult> ne = nexus.list( new ListOperationContext( normalizedName ) );
         if ( !ne.hasMore() )
         {
-            nexus.delete( normalizedName );
+            nexus.delete( new DeleteOperationContext( normalizedName ) );
             return;
         }
 
@@ -115,6 +121,6 @@
             recursiveDelete( nexus, dn, registry );
         }
         
-        nexus.delete( normalizedName );
+        nexus.delete( new DeleteOperationContext( normalizedName ) );
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/DeleteAttributeOperation.java Wed May 23 17:26:40 2007
@@ -25,8 +25,10 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.mitosis.common.CSN;
 
@@ -62,6 +64,8 @@
     {
         Attributes attrs = new AttributesImpl( true );
         attrs.put( getAttribute() );
-        nexus.modify( getName(), DirContext.REMOVE_ATTRIBUTE, attrs );
+        ModificationItemImpl[] items = ModifyOperationContext.createModItems( attrs, DirContext.REMOVE_ATTRIBUTE );
+
+        nexus.modify( new ModifyOperationContext( getName(), items ) );
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java Wed May 23 17:26:40 2007
@@ -33,7 +33,13 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
+import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
@@ -153,39 +159,15 @@
      * sets {@link Constants#ENTRY_DELETED} to "false" to resurrect the
      * entry the modified attributes belong to.
      */
-    public Operation newModify( LdapDN normalizedName, int modOp, Attributes attributes )
+    public Operation newModify( OperationContext opContext )
     {
-        CSN csn = newCSN();
-        CompositeOperation result = new CompositeOperation( csn );
-        NamingEnumeration e = attributes.getAll();
-        // Transform into multiple {@link AttributeOperation}s.
-        while ( e.hasMoreElements() )
-        {
-            Attribute attr = ( Attribute ) e.nextElement();
-            result.add( newModify( csn, normalizedName, modOp, attr ) );
-        }
-
-        // Resurrect the entry in case it is deleted.
-        result.add( new ReplaceAttributeOperation( csn, normalizedName, new AttributeImpl( Constants.ENTRY_DELETED,
-            "false" ) ) );
-
-        return addDefaultOperations( result, null, normalizedName );
-    }
+        ModificationItemImpl[] items = ((ModifyOperationContext)opContext).getModItems();
+        LdapDN normalizedName = opContext.getDn();
 
-
-    /**
-     * Returns a new {@link Operation} that performs "modify" operation.
-     * 
-     * @return a {@link CompositeOperation} that consists of one or more
-     * {@link AttributeOperation}s and one additional operation that
-     * sets {@link Constants#ENTRY_DELETED} to "false" to resurrect the
-     * entry the modified attributes belong to.
-     */
-    public Operation newModify( LdapDN normalizedName, ModificationItemImpl[] items )
-    {
         CSN csn = newCSN();
         CompositeOperation result = new CompositeOperation( csn );
-        final int length = items.length;
+        int length = items.length;
+        
         // Transform into multiple {@link AttributeOperation}s.
         for ( int i = 0; i < length; i++ )
         {
@@ -273,7 +255,8 @@
         // Retrieve all subtree including the base entry
         SearchControls ctrl = new SearchControls();
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration e = nexus.search( oldName, environment, new PresenceNode( Constants.OBJECT_CLASS_OID ), ctrl );
+        NamingEnumeration e = nexus.search( 
+            new SearchOperationContext( oldName, environment, new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl ) );
 
         while ( e.hasMore() )
         {
@@ -322,9 +305,9 @@
      */
     private void checkBeforeAdd( LdapDN newEntryName ) throws NamingException
     {
-        if ( nexus.hasEntry( newEntryName ) )
+        if ( nexus.hasEntry( new EntryOperationContext( newEntryName ) ) )
         {
-            Attributes entry = nexus.lookup( newEntryName );
+            Attributes entry = nexus.lookup( new LookupOperationContext( newEntryName ) );
             Attribute deleted = entry.get( Constants.ENTRY_DELETED );
             Object value = deleted == null ? null : deleted.get();
 

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/ReplaceAttributeOperation.java Wed May 23 17:26:40 2007
@@ -25,8 +25,10 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.mitosis.common.CSN;
 
@@ -62,6 +64,8 @@
     {
         Attributes attrs = new AttributesImpl( true );
         attrs.put( getAttribute() );
-        nexus.modify( getName(), DirContext.REPLACE_ATTRIBUTE, attrs );
+        ModificationItemImpl[] items = ModifyOperationContext.createModItems( attrs, DirContext.REPLACE_ATTRIBUTE );
+
+        nexus.modify( new ModifyOperationContext( getName(), items ) );
     }
 }

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java Wed May 23 17:26:40 2007
@@ -25,7 +25,11 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -40,7 +44,7 @@
     @SuppressWarnings("unchecked")
     public static boolean isEntryUpdatable( PartitionNexus nexus, LdapDN name, CSN newCSN ) throws NamingException
     {
-        Attributes entry = nexus.lookup( name );
+        Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
 
         if ( entry == null )
         {
@@ -92,7 +96,7 @@
     {
         try
         {
-            if ( nexus.hasEntry( name ) )
+            if ( nexus.hasEntry( new EntryOperationContext( name ) ) )
             {
                 return;
             }
@@ -113,13 +117,13 @@
         entry.put( rdnAttribute, rdnValue );
         
         //// Add objectClass attribute. 
-        Attribute objectClassAttr = new AttributeImpl( "objectClass" );
-        objectClassAttr.add( "top" );
-        objectClassAttr.add( "extensibleObject" );
+        Attribute objectClassAttr = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
+        objectClassAttr.add( SchemaConstants.TOP_OC );
+        objectClassAttr.add( SchemaConstants.EXTENSIBLE_OBJECT_OC );
         entry.put( objectClassAttr );
 
         // And add it to the nexus.
-        nexus.add( name, entry );
+        nexus.add( new AddOperationContext( name, entry ) );
     }
 
 

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java Wed May 23 17:26:40 2007
@@ -56,15 +56,21 @@
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.mina.common.IoAcceptor;
 import org.apache.mina.filter.LoggingFilter;
@@ -134,6 +140,10 @@
 public class ReplicationService extends BaseInterceptor
 {
     private static final Logger log = LoggerFactory.getLogger( ReplicationService.class );
+    
+    /** The service name */
+    public static final String NAME = "replicationService";
+    
 
     private static final String ENTRY_CSN_OID = "1.3.6.1.4.1.18060.0.4.1.2.30";
     private static final String ENTRY_DELETED_OID = "1.3.6.1.4.1.18060.0.4.1.2.31";
@@ -269,7 +279,7 @@
      */
     public void purgeAgedData() throws NamingException
     {
-        Attributes rootDSE = nexus.getRootDSE();
+        Attributes rootDSE = nexus.getRootDSE( null );
         Attribute namingContextsAttr = rootDSE.get( "namingContexts" );
         if ( namingContextsAttr == null || namingContextsAttr.size() == 0 )
         {
@@ -327,7 +337,8 @@
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
         ctrl.setReturningAttributes( new String[] { "entryCSN", "entryDeleted" } );
 
-        NamingEnumeration e = nexus.search( contextName, directoryServiceConfiguration.getEnvironment(), filter, ctrl );
+        NamingEnumeration e = nexus.search( 
+            new SearchOperationContext( contextName, directoryServiceConfiguration.getEnvironment(), filter, ctrl ) );
 
         List<LdapDN> names = new ArrayList<LdapDN>();
         try
@@ -353,9 +364,9 @@
             LdapDN name = it.next();
             try
             {
-                Attributes entry = nexus.lookup( name );
+                Attributes entry = nexus.lookup( new LookupOperationContext( name ) );
                 log.info( "Purge: " + name + " (" + entry + ')' );
-                nexus.delete( name );
+                nexus.delete( new DeleteOperationContext( name ) );
             }
             catch ( NamingException ex )
             {
@@ -365,9 +376,9 @@
     }
 
 
-    public void add( NextInterceptor nextInterceptor, LdapDN normalizedName, Attributes entry ) throws NamingException
+    public void add( NextInterceptor nextInterceptor, OperationContext addContext ) throws NamingException
     {
-        Operation op = operationFactory.newAdd( normalizedName, entry );
+        Operation op = operationFactory.newAdd( addContext.getDn(), ((AddOperationContext)addContext).getEntry() );
         op.execute( nexus, store, attrRegistry );
     }
 
@@ -379,16 +390,9 @@
     }
 
 
-    public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes attrs ) throws NamingException
+    public void modify( NextInterceptor next, OperationContext modifyContext ) throws NamingException
     {
-        Operation op = operationFactory.newModify( name, modOp, attrs );
-        op.execute( nexus, store, attrRegistry );
-    }
-
-
-    public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] items ) throws NamingException
-    {
-        Operation op = operationFactory.newModify( name, items );
+        Operation op = operationFactory.newModify( modifyContext );
         op.execute( nexus, store, attrRegistry );
     }
 
@@ -416,10 +420,10 @@
     }
 
 
-    public boolean hasEntry( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
+    public boolean hasEntry( NextInterceptor nextInterceptor, OperationContext entryContext ) throws NamingException
     {
         // Ask others first.
-        boolean hasEntry = nextInterceptor.hasEntry( name );
+        boolean hasEntry = nextInterceptor.hasEntry( entryContext );
 
         // If the entry exists,
         if ( hasEntry )
@@ -427,7 +431,7 @@
             // Check DELETED attribute.
             try
             {
-                Attributes entry = nextInterceptor.lookup( name );
+                Attributes entry = nextInterceptor.lookup( new LookupOperationContext( entryContext.getDn() ) );
                 hasEntry = !isDeleted( entry );
             }
             catch ( NameNotFoundException e )
@@ -441,39 +445,38 @@
     }
 
 
-    public Attributes lookup( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
-    {
-        Attributes result = nextInterceptor.lookup( name );
-        ensureNotDeleted( name, result );
-        return result;
-    }
-
-
-    public Attributes lookup( NextInterceptor nextInterceptor, LdapDN name, String[] attrIds ) throws NamingException
+    public Attributes lookup( NextInterceptor nextInterceptor, OperationContext lookupContext ) throws NamingException
     {
-        boolean found = false;
+        LookupOperationContext ctx = ((LookupOperationContext)lookupContext);
         
-        // Look for 'entryDeleted' attribute is in attrIds.
-        for ( int i = 0; i < attrIds.length; i++ )
+        if ( ctx.getAttrsId() != null )
         {
-            if ( Constants.ENTRY_DELETED.equals( attrIds[i] ) )
+            boolean found = false;
+            
+            String[] attrIds = ctx.getAttrsIdArray();
+            
+            // Look for 'entryDeleted' attribute is in attrIds.
+            for ( String attrId:attrIds )
             {
-                found = true;
-                break;
+                if ( Constants.ENTRY_DELETED.equals( attrId ) )
+                {
+                    found = true;
+                    break;
+                }
+            }
+    
+            // If not exists, add one.
+            if ( !found )
+            {
+                String[] newAttrIds = new String[attrIds.length + 1];
+                System.arraycopy( attrIds, 0, newAttrIds, 0, attrIds.length );
+                newAttrIds[attrIds.length] = Constants.ENTRY_DELETED;
+                ctx.setAttrsId( newAttrIds );
             }
         }
-
-        // If not exists, add one.
-        if ( !found )
-        {
-            String[] newAttrIds = new String[attrIds.length + 1];
-            System.arraycopy( attrIds, 0, newAttrIds, 0, attrIds.length );
-            newAttrIds[attrIds.length] = Constants.ENTRY_DELETED;
-            attrIds = newAttrIds;
-        }
-
-        Attributes result = nextInterceptor.lookup( name, attrIds );
-        ensureNotDeleted( name, result );
+        
+        Attributes result = nextInterceptor.lookup( lookupContext );
+        ensureNotDeleted( ctx.getDn(), result );
         return result;
     }
 
@@ -482,12 +485,13 @@
     {
         DirContext ctx = ( DirContext ) InvocationStack.getInstance().peek().getCaller();
         NamingEnumeration e = nextInterceptor.search(
+            new SearchOperationContext( 
                 baseName, ctx.getEnvironment(),
-                new PresenceNode( Constants.OBJECT_CLASS_OID ),
-                new SearchControls() );
+                new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ),
+                new SearchControls() ) );
 
         return new SearchResultFilteringEnumeration( e, new SearchControls(), InvocationStack.getInstance().peek(),
-            Constants.DELETED_ENTRIES_FILTER );
+            Constants.DELETED_ENTRIES_FILTER, "List replication filter" );
     }
 
 
@@ -503,9 +507,10 @@
             searchControls.setReturningAttributes( newAttrIds );
         }
         
-        NamingEnumeration e = nextInterceptor.search( baseName, environment, filter, searchControls );
+        NamingEnumeration e = nextInterceptor.search( 
+            new SearchOperationContext( baseName, environment, filter, searchControls ) );
         return new SearchResultFilteringEnumeration( e, searchControls, InvocationStack.getInstance().peek(),
-            Constants.DELETED_ENTRIES_FILTER );
+            Constants.DELETED_ENTRIES_FILTER, "Search Replication filter" );
     }
 
 
@@ -513,8 +518,8 @@
     {
         if ( isDeleted( entry ) )
         {
-            LdapNameNotFoundException e = new LdapNameNotFoundException( "Deleted entry: " + name );
-            e.setResolvedName( nexus.getMatchedName( name ) );
+            LdapNameNotFoundException e = new LdapNameNotFoundException( "Deleted entry: " + name.getUpName() );
+            e.setResolvedName( nexus.getMatchedName( new GetMatchedNameOperationContext( name ) ) );
             throw e;
         }
     }

Modified: directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java Wed May 23 17:26:40 2007
@@ -53,6 +53,8 @@
 import org.apache.directory.mitosis.service.protocol.message.LoginMessage;
 import org.apache.directory.mitosis.store.ReplicationLogIterator;
 import org.apache.directory.mitosis.store.ReplicationStore;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.mina.common.IdleStatus;
@@ -310,7 +312,7 @@
 
     private void sendAllEntries( ReplicationContext ctx ) throws NamingException
     {
-        Attributes rootDSE = ctx.getServiceConfiguration().getPartitionNexus().getRootDSE();
+        Attributes rootDSE = ctx.getServiceConfiguration().getPartitionNexus().getRootDSE( null );
 
         Attribute namingContextsAttr = rootDSE.get( "namingContexts" );
         if ( namingContextsAttr == null || namingContextsAttr.size() == 0 )
@@ -351,9 +353,10 @@
         // Retrieve all subtree including the base entry
         SearchControls ctrl = new SearchControls();
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration e = ctx.getServiceConfiguration().getPartitionNexus().search( contextName,
+        NamingEnumeration e = ctx.getServiceConfiguration().getPartitionNexus().search( 
+            new SearchOperationContext( contextName,
             ctx.getServiceConfiguration().getEnvironment(),
-            new PresenceNode( org.apache.directory.mitosis.common.Constants.OBJECT_CLASS_OID ), ctrl );
+            new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl ) );
 
         try
         {

Modified: directory/apacheds/branches/apacheds-sasl-branch/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/pom.xml?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/pom.xml (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/pom.xml Wed May 23 17:26:40 2007
@@ -5,12 +5,12 @@
   <parent>
     <groupId>org.apache.directory</groupId>
     <artifactId>build</artifactId>
-    <version>1.0.6</version>
+    <version>1.0.7-SNAPSHOT</version>
   </parent>
 
   <groupId>org.apache.directory.server</groupId>
   <artifactId>build</artifactId>
-  <version>1.5.0-SNAPSHOT</version>
+  <version>1.5.1-SNAPSHOT</version>
   <name>ApacheDS</name>
   <packaging>pom</packaging>
 
@@ -60,24 +60,30 @@
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-asn1-codec</artifactId>
-        <version>0.9.6-SNAPSHOT</version>
+        <version>0.9.7-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.apache.directory.shared</groupId>
+        <artifactId>shared-ldap-constants</artifactId>
+        <version>0.9.7-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.daemon</groupId>
         <artifactId>daemon-bootstrappers</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.1.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-core</artifactId>
-        <version>1.0.1</version>
+        <version>1.0.2</version>
       </dependency>
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-filter-ssl</artifactId>
-        <version>1.0.1</version>
+        <version>1.0.2</version>
       </dependency>
 
       <dependency>
@@ -141,11 +147,6 @@
         <version>3.8.1</version>
       </dependency>
       <dependency>
-        <groupId>bouncycastle</groupId>
-        <artifactId>lcrypto-jdk14</artifactId>
-        <version>131</version>
-      </dependency>
-      <dependency>
         <groupId>quartz</groupId>
         <artifactId>quartz</artifactId>
         <version>1.5.2</version>
@@ -206,13 +207,14 @@
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap</artifactId>
-      <version>0.9.6-SNAPSHOT</version>
+      <version>0.9.7-SNAPSHOT</version>
     </dependency>
   </dependencies>
 
       <modules>
         <!-- module>maven-osgi-plugin</module-->
 
+        <module>bootstrap-extract</module>
         <module>bootstrap-partition</module>
         <module>bootstrap-plugin</module>
         <module>schema-extras</module>

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/pom.xml?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/pom.xml (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/pom.xml Wed May 23 17:26:40 2007
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>build</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-protocol-changepw</artifactId>
   <name>ApacheDS Protocol Change Password</name>

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java Wed May 23 17:26:40 2007
@@ -52,8 +52,17 @@
 
     private IoHandler handler;
 
-    public ChangePasswordServer(ChangePasswordConfiguration config, IoAcceptor acceptor, IoServiceConfig serviceConfig, 
-        PrincipalStore store)
+
+    /**
+     * Creates a new instance of ChangePasswordServer.
+     *
+     * @param config
+     * @param acceptor
+     * @param serviceConfig
+     * @param store
+     */
+    public ChangePasswordServer( ChangePasswordConfiguration config, IoAcceptor acceptor,
+        IoServiceConfig serviceConfig, PrincipalStore store )
     {
         this.config = config;
         this.acceptor = acceptor;
@@ -77,12 +86,21 @@
     }
 
 
+    /**
+     * Returns whether configuration being proposed as new is really different.
+     *
+     * @param newConfig
+     * @return Whether configuration being proposed as new is really different.
+     */
     public boolean isDifferent( Dictionary newConfig )
     {
         return config.isDifferent( newConfig );
     }
 
 
+    /**
+     * Destroys this instance of {@link ChangePasswordServer}.
+     */
     public void destroy()
     {
         acceptor.unbind( new InetSocketAddress( config.getIpPort() ) );

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ErrorType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ErrorType.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ErrorType.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/exceptions/ErrorType.java Wed May 23 17:26:40 2007
@@ -34,43 +34,78 @@
  */
 public final class ErrorType implements Comparable
 {
-    /*
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+    /**
+     * Constant for the "Request failed due to being malformed" error type.
      */
     public static final ErrorType KRB5_KPASSWD_MALFORMED = new ErrorType( 1, "Request failed due to being malformed." );
+
+    /**
+     * Constant for the "Request failed due to a hard error in processing the request" error type.
+     */
     public static final ErrorType KRB5_KPASSWD_HARDERROR = new ErrorType( 2,
         "Request failed due to a hard error in processing the request." );
+
+    /**
+     * Constant for the "Request failed due to an error in authentication processing" error type.
+     */
     public static final ErrorType KRB5_KPASSWD_AUTHERROR = new ErrorType( 3,
         "Request failed due to an error in authentication processing." );
+
+    /**
+     * Constant for the "Request failed due to a soft error in processing the request" error type.
+     */
     public static final ErrorType KRB5_KPASSWD_SOFTERROR = new ErrorType( 4,
         "Request failed due to a soft error in processing the request." );
+
+    /**
+     * Constant for the "Requestor not authorized" error type.
+     */
     public static final ErrorType KRB5_KPASSWD_ACCESSDENIED = new ErrorType( 5, "Requestor not authorized." );
+
+    /**
+     * Constant for the "Protocol version unsupported" error type.
+     */
     public static final ErrorType KRB5_KPASSWD_BAD_VERSION = new ErrorType( 6, "Protocol version unsupported." );
+
+    /**
+     * Constant for the "Initial flag required" error type.
+     */
     public static final ErrorType KRB5_KPASSWD_INITIAL_FLAG_NEEDED = new ErrorType( 7, "Initial flag required." );
+
+    /**
+     * Constant for the "Request failed for an unknown reason" error type.
+     */
     public static final ErrorType KRB5_KPASSWD_UNKNOWN_ERROR = new ErrorType( 8,
         "Request failed for an unknown reason." );
 
-    /** Array for building a List of VALUES. */
+    /**
+     * Array for building a List of VALUES.
+     */
     private static final ErrorType[] values =
         { KRB5_KPASSWD_MALFORMED, KRB5_KPASSWD_HARDERROR, KRB5_KPASSWD_AUTHERROR, KRB5_KPASSWD_SOFTERROR,
             KRB5_KPASSWD_ACCESSDENIED, KRB5_KPASSWD_BAD_VERSION, KRB5_KPASSWD_INITIAL_FLAG_NEEDED,
             KRB5_KPASSWD_UNKNOWN_ERROR };
 
-    /** a list of all the error type constants */
+    /**
+     * A list of all the error type constants.
+     */
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
-    /** the name of the error type */
+    /**
+     * The name of the error type.
+     */
     private final String name;
 
-    /** the value/code for the error type */
+    /**
+     * The value/code for the error type.
+     */
     private final int ordinal;
 
 
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private ErrorType(int ordinal, String name)
+    private ErrorType( int ordinal, String name )
     {
         this.ordinal = ordinal;
         this.name = name;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordDataDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordDataDecoder.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordDataDecoder.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordDataDecoder.java Wed May 23 17:26:40 2007
@@ -41,6 +41,13 @@
  */
 public class ChangePasswordDataDecoder
 {
+    /**
+     * Decodes bytes into a ChangePasswordData.
+     *
+     * @param encodedChangePasswdData
+     * @return The {@link ChangePasswordData}.
+     * @throws IOException
+     */
     public ChangePasswordData decodeChangePasswordData( byte[] encodedChangePasswdData ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedChangePasswdData );

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorEncoder.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorEncoder.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorEncoder.java Wed May 23 17:26:40 2007
@@ -35,6 +35,13 @@
  */
 public class ChangePasswordErrorEncoder
 {
+    /**
+     * Encodes a {@link ChangePasswordError} into a {@link ByteBuffer}.
+     *
+     * @param buf
+     * @param message
+     * @throws IOException
+     */
     public void encode( ByteBuffer buf, ChangePasswordError message ) throws IOException
     {
         // Build error message bytes

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordReplyEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordReplyEncoder.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordReplyEncoder.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordReplyEncoder.java Wed May 23 17:26:40 2007
@@ -37,6 +37,13 @@
  */
 public class ChangePasswordReplyEncoder
 {
+    /**
+     * Encodes a {@link ChangePasswordReply} into a {@link ByteBuffer}.
+     *
+     * @param buf
+     * @param message
+     * @throws IOException
+     */
     public void encode( ByteBuffer buf, ChangePasswordReply message ) throws IOException
     {
         // Build application reply bytes

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordRequestDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordRequestDecoder.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordRequestDecoder.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordRequestDecoder.java Wed May 23 17:26:40 2007
@@ -37,6 +37,13 @@
  */
 public class ChangePasswordRequestDecoder
 {
+    /**
+     * Decodes a {@link ByteBuffer} into a {@link ChangePasswordRequest}.
+     *
+     * @param buf
+     * @return The {@link ChangePasswordRequest}.
+     * @throws IOException
+     */
     public ChangePasswordRequest decode( ByteBuffer buf ) throws IOException
     {
         ChangePasswordRequestModifier modifier = new ChangePasswordRequestModifier();

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/AbstractPasswordMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/AbstractPasswordMessage.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/AbstractPasswordMessage.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/AbstractPasswordMessage.java Wed May 23 17:26:40 2007
@@ -26,7 +26,9 @@
  */
 abstract public class AbstractPasswordMessage
 {
-    // ChangePassword protocol version number
+    /**
+     * ChangePassword protocol version number.
+     */
     public static final int PVNO = 1;
 
     private short messageLength;
@@ -34,7 +36,7 @@
     private short authHeaderLength;
 
 
-    protected AbstractPasswordMessage(short messageLength, short versionNumber, short authHeaderLength)
+    protected AbstractPasswordMessage( short messageLength, short versionNumber, short authHeaderLength )
     {
         this.messageLength = messageLength;
         this.versionNumber = versionNumber;
@@ -42,18 +44,33 @@
     }
 
 
+    /**
+     * Returns the message length.
+     *
+     * @return The message length.
+     */
     public short getMessageLength()
     {
         return messageLength;
     }
 
 
+    /**
+     * Returns the version number.
+     *
+     * @return The version number.
+     */
     public short getVersionNumber()
     {
         return versionNumber;
     }
 
 
+    /**
+     * Returns the length of the AuthHeader.
+     *
+     * @return The length of the AuthHeader.
+     */
     public short getAuthHeaderLength()
     {
         return authHeaderLength;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/AbstractPasswordMessageModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/AbstractPasswordMessageModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/AbstractPasswordMessageModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/AbstractPasswordMessageModifier.java Wed May 23 17:26:40 2007
@@ -31,18 +31,33 @@
     protected short authHeaderLength;
 
 
+    /**
+     * Sets the message length.
+     *
+     * @param messageLength
+     */
     public void setMessageLength( short messageLength )
     {
         this.messageLength = messageLength;
     }
 
 
+    /**
+     * Sets the protocol version number.
+     *
+     * @param versionNumber
+     */
     public void setProtocolVersionNumber( short versionNumber )
     {
         this.versionNumber = versionNumber;
     }
 
 
+    /**
+     * Sets the AuthHeader length.
+     *
+     * @param authHeaderLength
+     */
     public void setAuthHeaderLength( short authHeaderLength )
     {
         this.authHeaderLength = authHeaderLength;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordError.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordError.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordError.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordError.java Wed May 23 17:26:40 2007
@@ -32,8 +32,16 @@
     private ErrorMessage errorMessage;
 
 
-    public ChangePasswordError(short messageLength, short versionNumber, short authHeaderLength,
-        ErrorMessage errorMessage)
+    /**
+     * Creates a new instance of ChangePasswordError.
+     *
+     * @param messageLength
+     * @param versionNumber
+     * @param authHeaderLength
+     * @param errorMessage
+     */
+    public ChangePasswordError( short messageLength, short versionNumber, short authHeaderLength,
+        ErrorMessage errorMessage )
     {
         super( messageLength, versionNumber, authHeaderLength );
 
@@ -41,6 +49,11 @@
     }
 
 
+    /**
+     * Returns the {@link ErrorMessage}.
+     *
+     * @return The {@link ErrorMessage}.
+     */
     public ErrorMessage getErrorMessage()
     {
         return errorMessage;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordErrorModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordErrorModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordErrorModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordErrorModifier.java Wed May 23 17:26:40 2007
@@ -32,12 +32,22 @@
     private ErrorMessage errorMessage;
 
 
+    /**
+     * Returns the {@link ChangePasswordError}.
+     *
+     * @return The {@link ChangePasswordError}.
+     */
     public ChangePasswordError getChangePasswordError()
     {
         return new ChangePasswordError( messageLength, versionNumber, authHeaderLength, errorMessage );
     }
 
 
+    /**
+     * Sets the {@link ErrorMessage}.
+     *
+     * @param errorMessage
+     */
     public void setErrorMessage( ErrorMessage errorMessage )
     {
         this.errorMessage = errorMessage;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordReply.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordReply.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordReply.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordReply.java Wed May 23 17:26:40 2007
@@ -34,8 +34,17 @@
     private PrivateMessage privateMessage;
 
 
-    public ChangePasswordReply(short messageLength, short versionNumber, short authHeaderLength,
-        ApplicationReply applicationReply, PrivateMessage privateMessage)
+    /**
+     * Creates a new instance of ChangePasswordReply.
+     *
+     * @param messageLength
+     * @param versionNumber
+     * @param authHeaderLength
+     * @param applicationReply
+     * @param privateMessage
+     */
+    public ChangePasswordReply( short messageLength, short versionNumber, short authHeaderLength,
+        ApplicationReply applicationReply, PrivateMessage privateMessage )
     {
         super( messageLength, versionNumber, authHeaderLength );
 
@@ -44,12 +53,22 @@
     }
 
 
+    /**
+     * Returns the {@link ApplicationReply}.
+     *
+     * @return The {@link ApplicationReply}.
+     */
     public ApplicationReply getApplicationReply()
     {
         return applicationReply;
     }
 
 
+    /**
+     * Returns the {@link PrivateMessage}.
+     *
+     * @return The {@link PrivateMessage}.
+     */
     public PrivateMessage getPrivateMessage()
     {
         return privateMessage;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordReplyModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordReplyModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordReplyModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordReplyModifier.java Wed May 23 17:26:40 2007
@@ -34,6 +34,11 @@
     private PrivateMessage privateMessage;
 
 
+    /**
+     * Returns the {@link ChangePasswordReply}.
+     *
+     * @return The {@link ChangePasswordReply}.
+     */
     public ChangePasswordReply getChangePasswordReply()
     {
         return new ChangePasswordReply( messageLength, versionNumber, authHeaderLength, applicationReply,
@@ -41,12 +46,22 @@
     }
 
 
+    /**
+     * Sets the {@link ApplicationReply}.
+     *
+     * @param applicationReply
+     */
     public void setApplicationReply( ApplicationReply applicationReply )
     {
         this.applicationReply = applicationReply;
     }
 
 
+    /**
+     * Sets the {@link PrivateMessage}.
+     *
+     * @param privateMessage
+     */
     public void setPrivateMessage( PrivateMessage privateMessage )
     {
         this.privateMessage = privateMessage;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordRequest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordRequest.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordRequest.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordRequest.java Wed May 23 17:26:40 2007
@@ -34,8 +34,17 @@
     private PrivateMessage privateMessage;
 
 
-    public ChangePasswordRequest(short messageLength, short versionNumber, short authHeaderLength,
-        ApplicationRequest authHeader, PrivateMessage privateMessage)
+    /**
+     * Creates a new instance of ChangePasswordRequest.
+     *
+     * @param messageLength
+     * @param versionNumber
+     * @param authHeaderLength
+     * @param authHeader
+     * @param privateMessage
+     */
+    public ChangePasswordRequest( short messageLength, short versionNumber, short authHeaderLength,
+        ApplicationRequest authHeader, PrivateMessage privateMessage )
     {
         super( messageLength, versionNumber, authHeaderLength );
 
@@ -44,12 +53,22 @@
     }
 
 
+    /**
+     * Returns the {@link ApplicationRequest}.
+     *
+     * @return The {@link ApplicationRequest}.
+     */
     public ApplicationRequest getAuthHeader()
     {
         return authHeader;
     }
 
 
+    /**
+     * Returns the {@link PrivateMessage}.
+     *
+     * @return The {@link PrivateMessage}.
+     */
     public PrivateMessage getPrivateMessage()
     {
         return privateMessage;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordRequestModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordRequestModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordRequestModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/messages/ChangePasswordRequestModifier.java Wed May 23 17:26:40 2007
@@ -34,18 +34,33 @@
     private PrivateMessage privateMessage;
 
 
+    /**
+     * Returns the {@link ChangePasswordRequest}.
+     *
+     * @return The {@link ChangePasswordRequest}.
+     */
     public ChangePasswordRequest getChangePasswordMessage()
     {
         return new ChangePasswordRequest( messageLength, versionNumber, authHeaderLength, authHeader, privateMessage );
     }
 
 
+    /**
+     * Sets the AuthHeader.
+     *
+     * @param authHeader
+     */
     public void setAuthHeader( ApplicationRequest authHeader )
     {
         this.authHeader = authHeader;
     }
 
 
+    /**
+     * Sets the {@link PrivateMessage}.
+     *
+     * @param privateMessage
+     */
     public void setPrivateMessage( PrivateMessage privateMessage )
     {
         this.privateMessage = privateMessage;

Modified: directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolCodecFactory.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolCodecFactory.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolCodecFactory.java Wed May 23 17:26:40 2007
@@ -35,6 +35,11 @@
     private static final ChangePasswordProtocolCodecFactory INSTANCE = new ChangePasswordProtocolCodecFactory();
 
 
+    /**
+     * Returns the singleton instance of {@link ChangePasswordProtocolCodecFactory}.
+     *
+     * @return The singleton instance of {@link ChangePasswordProtocolCodecFactory}.
+     */
     public static ChangePasswordProtocolCodecFactory getInstance()
     {
         return INSTANCE;



Mime
View raw message