directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r613608 [2/15] - in /directory/sandbox/akarasulu/bigbang/apacheds: ./ bootstrap-plugin/ bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ core-entry/ core-entry/src/main/java/org/apache/directory/server/core/...
Date Sun, 20 Jan 2008 16:59:36 GMT
Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java Sun Jan 20 08:59:10 2008
@@ -24,6 +24,8 @@
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 
 import javax.naming.NamingException;
+
+import java.util.List;
 import java.util.Set;
 
 
@@ -33,7 +35,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public interface ServerEntry extends Entry<ServerAttribute>, Iterable<ServerAttribute>
+public interface ServerEntry extends Entry<ServerAttribute>, Cloneable
 {
     // -----------------------------------------------------------------------
     // Schema Related Methods
@@ -76,6 +78,15 @@
 
 
     /**
+     * Checks to see if this entry is of the objectClass.
+     *
+     * @param objectClass the objectClass to check for in this ServerEntry
+     * @return true if this entry is of the objectClass, false otherwise
+     */
+    boolean hasObjectClass( String objectClass );
+
+
+    /**
      * Gets the first structural objectClass that it can find within the entry.
      * If the entry is inconsistent and contains no objectClass attribute then
      * null is returned.  If the entry is inconsistent and contains more than
@@ -146,6 +157,14 @@
      */
     Set<AttributeType> getMayList();
 
+    
+    /**
+     * Gets all the attributes type (ObjectClasses, May and Must)
+     *
+     * @return The combined set of all the attributes, including ObjectClass.
+     */
+    Set<AttributeType> getAttributeTypes();
+    
 
     /**
      * Fail fast check performed to determine entry consistency according to schema
@@ -186,23 +205,35 @@
 
 
     /**
-     * Places a non-null attribute into this ServerEntry. If there an attribute
-     * of the same exists, the existing one is removed from the set and is
-     * returned by this method. If there was no attribute of the same type the
-     * return value is <code>null</code>.
+     * Returns the attribute with the specified ID. The return
+     * value is <code>null</code> if no match is found.
      *
-     * @param attribute the attribute to be put into this ServerEntry
-     * @return the existing attribute of the same type if it exists; otherwise
-     * <code>null</code>
+     * @param upId the ID of the attribute
+     * @return the attribute of the specified ID
      */
-    ServerAttribute put( ServerAttribute attribute ) throws NamingException;
+    ServerAttribute get( String upId ) throws NamingException;
 
-    // no value put'ters
 
-    ServerAttribute put( String upId, AttributeType attributeType ) throws NamingException;
+    /**
+     * Places non-null attributes in the attribute collection. If there is
+     * already an attribute with the same OID as any of the new attributes, 
+     * the old ones are removed from the collection and are returned by this 
+     * method. If there was no attribute with the same OID the return value 
+     * is <code>null</code>.
+     *
+     * @param attributes the attributes to be put
+     * @return the old attributes with the same OID, if exist; otherwise
+     *         <code>null</code>
+     */
+    List<ServerAttribute> put( ServerAttribute... attributes ) throws NamingException;
 
-    ServerAttribute put( AttributeType attributeType ) throws NamingException;
+    ServerAttribute put( String upId, String... values ) throws NamingException;
 
+    ServerAttribute put( String upId, byte[]... values ) throws NamingException;
+    
+    List<ServerAttribute> set( String... upIds ) throws NamingException;
+
+    List<ServerAttribute> set( AttributeType... attributeTypes ) throws NamingException;
 
     /**
      * Places a new attribute of the supplied type and value into the attribute
@@ -218,12 +249,12 @@
      * value: the value of <code>val</code> may be <code>null</code>.
      *
      * @param attributeType the type of the new attribute to be put
-     * @param val the value of the new attribute to be put
+     * @param values the values of the new attribute to be put
      * @return the old attribute of the same type, if exists; otherwise
      *         <code>null</code>
      * @throws NamingException if there are resolution issues
      */
-    ServerAttribute put( AttributeType attributeType, ServerValue<?> val ) throws NamingException;
+    ServerAttribute put( AttributeType attributeType, ServerValue<?>... values ) throws NamingException;
 
     /**
      * Places a new attribute with the supplied attributeType and value into this
@@ -235,13 +266,12 @@
      * value: the value of <code>obj</code> may be <code>null</code>.
      *
      * @param upId the user provided identifier for the new attribute
-     * @param attributeType the type of the new attribute to be put
-     * @param val the value of the new attribute to be put
+     * @param values the value of the new attribute to be put
      * @return the old attribute of the same type, if exists; otherwise
      *         <code>null</code>
      * @throws NamingException if there are failures
      */
-    ServerAttribute put( String upId, AttributeType attributeType, ServerValue<?> val ) throws NamingException;
+    ServerAttribute put( String upId, ServerValue<?>... values ) throws NamingException;
 
 
     /**
@@ -256,15 +286,12 @@
      * <code>null</code>.
      *
      * @param attributeType the type of the new attribute to be put
-     * @param val the value of the new attribute to be put
+     * @param values the values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      *         <code>null</code>
      * @throws NamingException if there are failures
      */
-    ServerAttribute put( AttributeType attributeType, String val ) throws NamingException;
-
-
-    ServerAttribute put( String upId, AttributeType attributeType, String val ) throws NamingException;
+    ServerAttribute put( AttributeType attributeType, String... values ) throws NamingException;
 
 
     /**
@@ -279,15 +306,24 @@
      * <code>null</code>.
      *
      * @param attributeType the type of the new attribute to be put
-     * @param val the value of the new attribute to be put
+     * @param values the values of the new attribute to be put
      * @return the old attribute with the same identifier, if exists; otherwise
      *         <code>null</code>
      * @throws NamingException if there are failures
      */
-    ServerAttribute put( AttributeType attributeType, byte[] val ) throws NamingException;
+    ServerAttribute put( AttributeType attributeType, byte[]... values ) throws NamingException;
 
 
-    ServerAttribute put( String upId, AttributeType attributeType, byte[] val ) throws NamingException;
+    /**
+     * Removes the attribute with the specified alias. The removed attribute is
+     * returned by this method. If there is no attribute with the specified OID,
+     * the return value is <code>null</code>.
+     *
+     * @param attributeTypes the types of the attribute to be removed
+     * @return the removed attribute, if exists; otherwise <code>null</code>
+     * @throws NamingException if there are failures
+     */
+    List<ServerAttribute> remove( AttributeType... attributeTypes ) throws NamingException;
 
 
     /**
@@ -295,9 +331,25 @@
      * returned by this method. If there is no attribute with the specified OID,
      * the return value is <code>null</code>.
      *
-     * @param attributeType the type of the attribute to be removed
+     * @param ids the IDs of the attribute to be removed
      * @return the removed attribute, if exists; otherwise <code>null</code>
      * @throws NamingException if there are failures
      */
-    ServerAttribute remove( AttributeType attributeType ) throws NamingException;
+    List<ServerAttribute> remove( String... ids ) throws NamingException;
+
+
+    /**
+     * Removes the specified attributes. The removed attributes are
+     * returned by this method. If there were no attribute the return value
+     * is <code>null</code>.
+     *
+     * @param attributes the attributes to be removed
+     * @return the removed attribute, if exists; otherwise <code>null</code>
+     */
+    List<ServerAttribute> remove( ServerAttribute... attributes ) throws NamingException;
+    
+    /**
+     * A clone method to produce a clone of the current object
+     */
+    public Object clone();
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java Sun Jan 20 08:59:10 2008
@@ -23,10 +23,8 @@
 
 import javax.naming.directory.DirContext;
 
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.entry.Value;
 
 /**
  * An internal implementation for a ModificationItem. The name has been
@@ -35,7 +33,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ServerModification implements Modification, Serializable
+public class ServerModification<T extends ServerAttribute> implements Modification<T>, Serializable
 {
     public static final long serialVersionUID = 1L;
     
@@ -43,7 +41,7 @@
     private ModificationOperation operation;
     
     /** The attribute which contains the modification */
-    private EntryAttribute<? extends Value<?>> attribute;
+    private T attribute;
  
     
     /**
@@ -90,7 +88,7 @@
     /**
      * @return the attribute containing the modifications
      */
-    public EntryAttribute<? extends Value<?>> getAttribute()
+    public T getAttribute()
     {
         return attribute;
     }
@@ -101,7 +99,7 @@
      *
      * @param attribute The modified attribute 
      */
-    public void setAttribute( EntryAttribute<? extends Value<?>> attribute )
+    public void setAttribute( T attribute )
     {
         this.attribute = attribute;
     }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStreamedValue.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStreamedValue.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStreamedValue.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStreamedValue.java Sun Jan 20 08:59:10 2008
@@ -20,7 +20,7 @@
 
 
 import org.apache.directory.shared.ldap.NotImplementedException;
-import org.apache.directory.shared.ldap.entry.StreamedValue;
+import org.apache.directory.shared.ldap.entry.AbstractStreamedValue;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -72,8 +72,11 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ServerStreamedValue extends StreamedValue implements ServerValue<URI>
+public class ServerStreamedValue extends AbstractStreamedValue implements ServerValue<URI>
 {
+    /** Used for serialization */
+    public static final long serialVersionUID = 2L;
+    
     /** logger for reporting errors that might not be handled properly upstream */
     private static final Logger LOG = LoggerFactory.getLogger( ServerStreamedValue.class );
 
@@ -143,6 +146,10 @@
     // -----------------------------------------------------------------------
     // ServerValue<String> Methods
     // -----------------------------------------------------------------------
+    public void normalize() throws NamingException
+    {
+        
+    }
 
 
     /**
@@ -245,5 +252,23 @@
         }
 
         return false;
+    }
+    
+
+    /**
+     * @return a copy of the current value
+     */
+    public ServerStreamedValue clone()
+    {
+        try
+        {
+            ServerStreamedValue clone = (ServerStreamedValue)super.clone();
+            
+            return clone;
+        }
+        catch ( CloneNotSupportedException cnse )
+        {
+            return null;
+        }
     }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java Sun Jan 20 08:59:10 2008
@@ -20,7 +20,7 @@
 
 
 import org.apache.directory.shared.ldap.NotImplementedException;
-import org.apache.directory.shared.ldap.entry.StringValue;
+import org.apache.directory.shared.ldap.entry.AbstractStringValue;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -28,6 +28,11 @@
 import org.slf4j.LoggerFactory;
 
 import javax.naming.NamingException;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.Comparator;
 
 
@@ -40,20 +45,19 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ServerStringValue extends StringValue implements ServerValue<String>
+public class ServerStringValue extends AbstractStringValue implements ServerValue<String>, Externalizable
 {
+    /** Used for serialization */
+    public static final long serialVersionUID = 2L;
+    
     /** logger for reporting errors that might not be handled properly upstream */
     private static final Logger LOG = LoggerFactory.getLogger( ServerStringValue.class );
 
-    /** used to dynamically lookup the attributeType when/if deserializing */
-    @SuppressWarnings ( { "FieldCanBeLocal", "UnusedDeclaration" } )
-    private final String oid;
-
     /** reference to the attributeType which is not serialized */
     private transient AttributeType attributeType;
 
     /** the canonical representation of the wrapped String value */
-    private transient String normalizedValue;
+    private String normalizedValue;
 
     /** cached results of the isValid() method call */
     private transient Boolean valid;
@@ -66,10 +70,7 @@
      */
     public ServerStringValue( AttributeType attributeType )
     {
-        if ( attributeType == null )
-        {
-            throw new NullPointerException( "attributeType cannot be null" );
-        }
+        assert checkAttributeType( attributeType) == null : logAssert( checkAttributeType( attributeType ) );
 
         try
         {
@@ -85,7 +86,6 @@
         }
 
         this.attributeType = attributeType;
-        this.oid = attributeType.getOid();
     }
 
 
@@ -119,7 +119,7 @@
     {
         // Why should we invalidate the normalized value if it's we're setting the
         // wrapper to it's current value?
-        if ( wrapped.equals( get() ) )
+        if ( ( wrapped != null ) && wrapped.equals( get() ) )
         {
             return;
         }
@@ -133,10 +133,28 @@
     // -----------------------------------------------------------------------
     // ServerValue<String> Methods
     // -----------------------------------------------------------------------
+    /**
+     * Compute the normalized (canonical) representation for the wrapped string.
+     * If the wrapped String is null, the normalized form will be null too.  
+     *
+     * @throws NamingException if the value cannot be properly normalized
+     */
+    public void normalize() throws NamingException
+    {
+        Normalizer normalizer = getNormalizer();
 
+        if ( normalizer == null )
+        {
+            normalizedValue = get();
+        }
+        else
+        {
+            normalizedValue = ( String ) normalizer.normalize( get() );
+        }
+    }
 
     /**
-     * Gets the normalized (cannonical) representation for the wrapped string.
+     * Gets the normalized (canonical) representation for the wrapped string.
      * If the wrapped String is null, null is returned, otherwise the normalized
      * form is returned.  If no the normalizedValue is null, then this method
      * will attempt to generate it from the wrapped value: repeated calls to
@@ -155,16 +173,7 @@
 
         if ( normalizedValue == null )
         {
-            Normalizer normalizer = getNormalizer();
-
-            if ( normalizer == null )
-            {
-                normalizedValue = get();
-            }
-            else
-            {
-                normalizedValue = ( String ) normalizer.normalize( get() );
-            }
+            normalize();
         }
 
         return normalizedValue;
@@ -251,13 +260,7 @@
             return true;
         }
 
-        //noinspection RedundantIfStatement
-        if ( this.attributeType.isDescentantOf( attributeType ) )
-        {
-            return true;
-        }
-
-        return false;
+        return this.attributeType.isDescentantOf( attributeType );
     }
 
 
@@ -308,11 +311,6 @@
             return true;
         }
 
-        if ( obj == null )
-        {
-            return false;
-        }
-
         if ( ! ( obj instanceof ServerStringValue ) )
         {
             return false;
@@ -414,5 +412,81 @@
         }
 
         return mr.getComparator();
+    }
+    
+    
+    /**
+     * @return a copy of the current value
+     */
+    public ServerStringValue clone()
+    {
+        try
+        {
+            return (ServerStringValue)super.clone();
+        }
+        catch ( CloneNotSupportedException cnse )
+        {
+            return null;
+        }
+    }
+    
+    
+    /**
+     * @see Externalizable#writeExternal(ObjectOutput)
+     * 
+     * We will write the value and the normalized value, only
+     * if the normalized value is different.
+     * 
+     * The data will be stored following this structure :
+     * 
+     *  [UP value]
+     *  [Norm value] (will be null if normValue == upValue)
+     */
+    public void writeExternal( ObjectOutput out ) throws IOException
+    {
+        if ( get() != null )
+        {
+            out.writeUTF( get() );
+            
+            if ( normalizedValue.equals( get() ) )
+            {
+                // If the normalized value is equal to the UP value,
+                // don't save it
+                out.writeUTF( "" );
+            }
+            else
+            {
+                out.writeUTF( normalizedValue );
+            }
+        }
+        
+        out.flush();
+    }
+
+    
+    /**
+     * @see Externalizable#readExternal(ObjectInput)
+     */
+    public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
+    {
+        if ( in.available() == 0 )
+        {
+            set( null );
+            normalizedValue = null;
+        }
+        else
+        {
+            String wrapped = in.readUTF();
+            
+            set( wrapped );
+            
+            normalizedValue = in.readUTF();
+            
+            if ( ( normalizedValue.length() == 0 ) &&  ( wrapped.length() != 0 ) )
+            {
+                // In this case, the normalized value is equal to the UP value
+                normalizedValue = wrapped;
+            }
+        }
     }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java Sun Jan 20 08:59:10 2008
@@ -82,4 +82,15 @@
 
     
     boolean instanceOf( AttributeType attributeType ) throws NamingException;
+    
+    ServerValue<T> clone();
+    
+    
+    /**
+     * Compute the normalized value
+     *
+     * @throws NamingException If the normalized has not been created of if
+     * there is a problem during the normalization
+     */
+    void normalize() throws NamingException;
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java Sun Jan 20 08:59:10 2008
@@ -21,10 +21,6 @@
 
 import javax.naming.NamingException;
 
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.junit.Test;
 import static org.junit.Assert.assertTrue;
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java Sun Jan 20 08:59:10 2008
@@ -25,16 +25,24 @@
 import org.apache.directory.shared.ldap.schema.AbstractSyntax;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.ByteArrayComparator;
+import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.Syntax;
 import org.apache.directory.shared.ldap.schema.syntax.AcceptAllSyntaxChecker;
 import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
+import org.junit.Before;
 import org.junit.Test;
 
 import javax.naming.NamingException;
 import javax.naming.directory.InvalidAttributeValueException;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -42,7 +50,9 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -60,6 +70,162 @@
  */
 public class ServerStringValueTest
 {
+    static private S s;
+    static private AT at;
+    static private MR mr;
+    
+    /**
+     * A local Syntax class for tests
+     */
+    static class AT extends AbstractAttributeType
+    {
+        public static final long serialVersionUID = 0L;
+        AttributeType superior;
+        Syntax syntax;
+        MatchingRule equality;
+        MatchingRule ordering;
+        MatchingRule substr;
+
+        protected AT( String oid )
+        {
+            super( oid );
+        }
+
+        public AttributeType getSuperior() throws NamingException
+        {
+            return superior;
+        }
+
+
+        public Syntax getSyntax() throws NamingException
+        {
+            return syntax;
+        }
+
+
+        public MatchingRule getEquality() throws NamingException
+        {
+            return equality;
+        }
+
+
+        public MatchingRule getOrdering() throws NamingException
+        {
+            return ordering;
+        }
+
+
+        public MatchingRule getSubstr() throws NamingException
+        {
+            return substr;
+        }
+
+
+        public void setSuperior( AttributeType superior )
+        {
+            this.superior = superior;
+        }
+
+
+        public void setSyntax( Syntax syntax )
+        {
+            this.syntax = syntax;
+        }
+
+
+        public void setEquality( MatchingRule equality )
+        {
+            this.equality = equality;
+        }
+
+
+        public void setOrdering( MatchingRule ordering )
+        {
+            this.ordering = ordering;
+        }
+
+
+        public void setSubstr( MatchingRule substr )
+        {
+            this.substr = substr;
+        }
+    }
+
+    /**
+     * A local MatchingRule class for tests
+     */
+    static class MR extends AbstractMatchingRule
+    {
+        public static final long serialVersionUID = 0L;
+        private Syntax syntax;
+        private Comparator comparator;
+        private Normalizer normalizer;
+
+        protected MR( String oid )
+        {
+            super( oid );
+        }
+
+        public Syntax getSyntax() throws NamingException
+        {
+            return syntax;
+        }
+
+        public Comparator getComparator() throws NamingException
+        {
+            return comparator;
+        }
+
+
+        public Normalizer getNormalizer() throws NamingException
+        {
+            return normalizer;
+        }
+
+
+        public void setSyntax( Syntax syntax )
+        {
+            this.syntax = syntax;
+        }
+
+
+        public void setComparator( Comparator<?> comparator )
+        {
+            this.comparator = comparator;
+        }
+
+
+        public void setNormalizer( Normalizer normalizer )
+        {
+            this.normalizer = normalizer;
+        }
+    }
+
+
+    /**
+     * A local Syntax class used for the tests
+     */
+    static class S extends AbstractSyntax
+    {
+        public static final long serialVersionUID = 0L;
+        SyntaxChecker checker;
+
+        public S( String oid, boolean humanReadible )
+        {
+            super( oid, humanReadible );
+        }
+
+        public void setSyntaxChecker( SyntaxChecker checker )
+        {
+            this.checker = checker;
+        }
+
+        public SyntaxChecker getSyntaxChecker() throws NamingException
+        {
+            return checker;
+        }
+    }
+
     private AttributeType getCaseIgnoringAttributeNoNumbersType()
     {
         S s = new S( "1.1.1.1", true );
@@ -78,6 +244,7 @@
                 }
 
                 String strval = ( String ) value;
+                
                 for ( char c:strval.toCharArray() )
                 {
                     if ( Character.isDigit( c ) )
@@ -103,24 +270,9 @@
         {
             public int compare( String o1, String o2 )
             {
-                if ( o1 == null && o2 == null )
-                {
-                    return 0;
-                }
-
-                //noinspection ConstantConditions
-                if ( ( o1 == null ) && ( o2 != null ) )
-                {
-                    return -1;
-                }
-
-                //noinspection ConstantConditions
-                if ( ( o1 != null ) && ( o2 == null ) )
-                {
-                    return 1;
-                }
-
-                return o1.compareTo( o2 );
+                return ( o1 == null ? 
+                    ( o2 == null ? 0 : -1 ) :
+                    ( o2 == null ? 1 : o1.compareTo( o2 ) ) );
             }
 
             int getValue( String val )
@@ -144,6 +296,7 @@
         
         mr.normalizer = new Normalizer()
         {
+            public static final long serialVersionUID = 1L;
 
             public Object normalize( Object value ) throws NamingException
             {
@@ -155,6 +308,7 @@
                 throw new IllegalStateException( "expected string to normalize" );
             }
         };
+        
         AT at = new AT( "1.1.3.1" );
         at.setEquality( mr );
         at.setSyntax( s );
@@ -162,6 +316,190 @@
     }
 
 
+    private AttributeType getIA5StringAttributeType()
+    {
+        AT at = new AT( "1.1" );
+
+        S s = new S( "1.1.1", true );
+
+        s.setSyntaxChecker( new SyntaxChecker()
+        {
+            public String getSyntaxOid()
+            {
+                return "1.1.1";
+            }
+            public boolean isValidSyntax( Object value )
+            {
+                return ((String)value).length() < 5 ;
+            }
+
+            public void assertSyntax( Object value ) throws NamingException
+            {
+                if ( ! isValidSyntax( value ) )
+                {
+                    throw new InvalidAttributeValueException();
+                }
+            }
+        } );
+
+        final MR mr = new MR( "1.1.2" );
+        mr.syntax = s;
+        mr.comparator = new Comparator<String>()
+        {
+            public int compare( String o1, String o2 )
+            {
+                return ( ( o1 == null ) ? 
+                    ( o2 == null ? 0 : -1 ) :
+                    ( o2 == null ? 1 : o1.compareTo( o2 ) ) );
+            }
+        };
+        
+        mr.normalizer = new Normalizer()
+        {
+            public static final long serialVersionUID = 1L;
+            
+            public Object normalize( Object value ) throws NamingException
+            {
+                if ( value instanceof String )
+                {
+                    return ( ( String ) value ).toLowerCase();
+                }
+
+                throw new IllegalStateException( "expected string to normalize" );
+            }
+        };
+        
+        at.setEquality( mr );
+        at.setSyntax( s );
+        return at;
+    }
+
+    
+    /**
+     * Initialize an AttributeType and the associated MatchingRule 
+     * and Syntax
+     */
+    @Before public void initAT()
+    {
+        s = new S( "1.1.1.1", false );
+        s.setSyntaxChecker( new AcceptAllSyntaxChecker( "1.1.1.1" ) );
+        mr = new MR( "1.1.2.1" );
+        mr.syntax = s;
+        mr.comparator = new ByteArrayComparator();
+        mr.normalizer = new DeepTrimToLowerNormalizer();
+        at = new AT( "1.1.3.1" );
+        at.setEquality( mr );
+        at.setOrdering( mr );
+        at.setSubstr( mr );
+        at.setSyntax( s );
+    }
+    
+
+    /**
+     * Test the constructor with bad AttributeType
+     */
+    @Test public void testBadConstructor()
+    {
+        try
+        {
+            new ServerStringValue( null );
+            fail();
+        }
+        catch ( AssertionError ae )
+        {
+            // Expected...
+        }
+        
+        // create a AT without any syntax
+        AttributeType at = new AT( "1.1.3.1" );
+        
+        try
+        {
+            new ServerStringValue( at );
+            fail();
+        }
+        catch ( AssertionError ae )
+        {
+            // Expected...
+        }
+    }
+
+
+    /**
+     * Test the constructor with a null value
+     */
+    @Test public void testNullValue()
+    {
+        AttributeType at = getIA5StringAttributeType();
+        
+        ServerStringValue value = new ServerStringValue( at, null );
+        
+        assertNull( value.get() );
+        assertTrue( value.isNull() );
+    }
+    
+    
+    /**
+     * Test the equals method
+     */
+    @Test public void testEquals()
+    {
+        AttributeType at = getIA5StringAttributeType();
+        
+        ServerStringValue value1 = new ServerStringValue( at, "test" );
+        ServerStringValue value2 = new ServerStringValue( at, "test" );
+        ServerStringValue value3 = new ServerStringValue( at, "TEST" );
+        ServerStringValue value4 = new ServerStringValue( at, "tes" );
+        ServerStringValue value5 = new ServerStringValue( at, null );
+        
+        assertTrue( value1.equals( value1 ) );
+        assertTrue( value1.equals( value2 ) );
+        assertTrue( value1.equals( value3 ) );
+        assertFalse( value1.equals( value4 ) );
+        assertFalse( value1.equals( value5 ) );
+        assertFalse( value1.equals( "test" ) );
+        assertFalse( value1.equals( null ) );
+    }
+
+    
+    /**
+     * Test the getNormalized method
+     * TODO testNormalized.
+     *
+     */
+    @Test public void testGetNormalized() throws NamingException
+    {
+        AttributeType at = getIA5StringAttributeType();
+        
+        ServerStringValue value = new ServerStringValue( at, "TEST" );
+        
+        assertEquals( "test", value.getNormalized() );
+
+        value = new ServerStringValue( at, null );
+        
+        assertNull( value.getNormalized() );
+    }
+    
+    
+    /**
+     * Test the isValid method
+     * 
+     * The SyntaxChecker does not accept values longer than 5 chars.
+     */
+    @Test public void testIsValid() throws NamingException
+    {
+        AttributeType at = getIA5StringAttributeType();
+        
+        ServerStringValue value = new ServerStringValue( at, "test" );
+        
+        assertTrue( value.isValid() );
+
+        value = new ServerStringValue( at, "testlong" );
+        
+        assertFalse( value.isValid() );
+    }
+    
+    
     /**
      * Tests to make sure the hashCode method is working properly.
      * @throws Exception on errors
@@ -225,19 +563,18 @@
         {
             public int compare( String o1, String o2 )
             {
-                if ( o1 == null && o2 == null )
+                if ( o1 == null )
                 {
-                    return 0;
-                }
-
-                //noinspection ConstantConditions
-                if ( o1 == null && o2 != null )
-                {
-                    return -1;
+                    if ( o2 == null )
+                    {
+                        return 0;
+                    }
+                    else
+                    {
+                        return -1;
+                    }
                 }
-
-                //noinspection ConstantConditions
-                if ( o1 != null && o2 == null )
+                else if ( o2 == null )
                 {
                     return 1;
                 }
@@ -320,7 +657,6 @@
         list.add( v2 );
         list.add( v4 );
 
-        //noinspection unchecked
         Collections.sort( list );
 
         // null ones are at first 2 indices
@@ -353,18 +689,6 @@
      */
     @Test public void testAcceptAllNoNormalization() throws Exception
     {
-        S s = new S( "1.1.1.1", false );
-        s.setSyntaxChecker( new AcceptAllSyntaxChecker( "1.1.1.1" ) );
-        final MR mr = new MR( "1.1.2.1" );
-        mr.syntax = s;
-        mr.comparator = new ByteArrayComparator();
-        mr.normalizer = new NoOpNormalizer();
-        AT at = new AT( "1.1.3.1" );
-        at.setEquality( mr );
-        at.setOrdering( mr );
-        at.setSubstr( mr );
-        at.setSyntax( s );
-
         // check that normalization and syntax checks work as expected
         ServerStringValue value = new ServerStringValue( at, "hello" );
         assertEquals( value.get(), value.get() );
@@ -440,7 +764,6 @@
 
                 try
                 {
-                    //noinspection unchecked
                     return mr.getComparator().compare( b1, b2 );
                 }
                 catch ( Exception e )
@@ -469,143 +792,129 @@
     }
 
     
-    static class AT extends AbstractAttributeType
+    /**
+     * Test serialization of a StringValue which has a normalized value
+     */
+    @Test public void testNormalizedStringValueSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeType superior;
-        Syntax syntax;
-        MatchingRule equality;
-        MatchingRule ordering;
-        MatchingRule substr;
-
-        protected AT( String oid )
-        {
-            super( oid );
-        }
-
-        public AttributeType getSuperior() throws NamingException
-        {
-            return superior;
-        }
-
-
-        public Syntax getSyntax() throws NamingException
-        {
-            return syntax;
-        }
-
-
-        public MatchingRule getEquality() throws NamingException
-        {
-            return equality;
-        }
-
-
-        public MatchingRule getOrdering() throws NamingException
-        {
-            return ordering;
-        }
-
-
-        public MatchingRule getSubstr() throws NamingException
-        {
-            return substr;
-        }
-
-
-        public void setSuperior( AttributeType superior )
-        {
-            this.superior = superior;
-        }
-
-
-        public void setSyntax( Syntax syntax )
-        {
-            this.syntax = syntax;
-        }
-
-
-        public void setEquality( MatchingRule equality )
-        {
-            this.equality = equality;
-        }
-
-
-        public void setOrdering( MatchingRule ordering )
-        {
-            this.ordering = ordering;
-        }
+        // First check with a value which will be normalized
+        ServerStringValue sv = new ServerStringValue( at, "  Test   Test  " );
+        
+        sv.normalize();
+        String normalized = sv.getNormalized();
+        
+        assertEquals( "test test", normalized );
+        assertEquals( "  Test   Test  ", sv.get() );
+        
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream( baos );
+        
+        sv.writeExternal( out );
+        
+        ObjectInputStream in = null;
 
+        byte[] data = baos.toByteArray();
+        in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+        
+        ServerStringValue sv2 = new ServerStringValue( at );
+        sv2.readExternal( in );
+        
+        assertEquals( sv, sv2 );
+   }
 
-        public void setSubstr( MatchingRule substr )
-        {
-            this.substr = substr;
-        }
-    }
 
-    static class MR extends AbstractMatchingRule
+    /**
+     * Test serialization of a StringValue which does not have a normalized value
+     */
+    @Test public void testNoNormalizedStringValueSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        private Syntax syntax;
-        private Comparator comparator;
-        private Normalizer normalizer;
-
-        protected MR( String oid )
-        {
-            super( oid );
-        }
-
-        public Syntax getSyntax() throws NamingException
-        {
-            return syntax;
-        }
-
-        public Comparator getComparator() throws NamingException
-        {
-            return comparator;
-        }
-
-
-        public Normalizer getNormalizer() throws NamingException
-        {
-            return normalizer;
-        }
-
-
-        public void setSyntax( Syntax syntax )
-        {
-            this.syntax = syntax;
-        }
+        // First check with a value which will be normalized
+        ServerStringValue sv = new ServerStringValue( at, "test" );
+        
+        sv.normalize();
+        String normalized = sv.getNormalized();
+        
+        assertEquals( "test", normalized );
+        assertEquals( "test", sv.get() );
+        
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream( baos );
+        
+        sv.writeExternal( out );
+        
+        ObjectInputStream in = null;
 
+        byte[] data = baos.toByteArray();
+        
+        in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+        
+        ServerStringValue sv2 = new ServerStringValue( at );
+        sv2.readExternal( in );
+        
+        assertEquals( sv, sv2 );
+   }
 
-        public void setComparator( Comparator comparator )
-        {
-            this.comparator = comparator;
-        }
 
+    /**
+     * Test serialization of a null StringValue
+     */
+    @Test public void testNullStringValueSerialization() throws NamingException, IOException, ClassNotFoundException
+    {
+        // First check with a value which will be normalized
+        ServerStringValue sv = new ServerStringValue( at );
+        
+        sv.normalize();
+        String normalized = sv.getNormalized();
+        
+        assertEquals( null, normalized );
+        assertEquals( null, sv.get() );
+        
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream( baos );
+        
+        sv.writeExternal( out );
+        
+        ObjectInputStream in = null;
 
-        public void setNormalizer( Normalizer normalizer )
-        {
-            this.normalizer = normalizer;
-        }
-    }
+        byte[] data = baos.toByteArray();
+        
+        in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+        
+        ServerStringValue sv2 = new ServerStringValue( at );
+        sv2.readExternal( in );
+        
+        assertEquals( sv, sv2 );
+   }
 
 
-    static class S extends AbstractSyntax
+    /**
+     * Test serialization of an empty StringValue
+     */
+    @Test public void testEmptyStringValueSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        SyntaxChecker checker;
-
-        public S( String oid, boolean humanReadible )
-        {
-            super( oid, humanReadible );
-        }
-
-        public void setSyntaxChecker( SyntaxChecker checker )
-        {
-            this.checker = checker;
-        }
+        // First check with a value which will be normalized
+        ServerStringValue sv = new ServerStringValue( at, "" );
+        
+        sv.normalize();
+        String normalized = sv.getNormalized();
+        
+        assertEquals( "", normalized );
+        assertEquals( "", sv.get() );
+        
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream( baos );
+        
+        sv.writeExternal( out );
+        
+        ObjectInputStream in = null;
 
-        public SyntaxChecker getSyntaxChecker() throws NamingException
-        {
-            return checker;
-        }
-    }
+        byte[] data = baos.toByteArray();
+        
+        in = new ObjectInputStream( new ByteArrayInputStream( data ) );
+        
+        ServerStringValue sv2 = new ServerStringValue( at );
+        sv2.readExternal( in );
+        
+        assertEquals( sv, sv2 );
+   }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java Sun Jan 20 08:59:10 2008
@@ -19,8 +19,7 @@
 package org.apache.directory.server.core.integ;
 
 
-import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.core.integ.annotations.Mode;
+import org.apache.directory.server.core.integ.annotations.*;
 
 
 /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/CiRunner.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/CiRunner.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/CiRunner.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/CiRunner.java Sun Jan 20 08:59:10 2008
@@ -19,7 +19,11 @@
 package org.apache.directory.server.core.integ;
 
 
-import static org.apache.directory.server.core.integ.state.TestServiceContext.*;
+//port static org.apache.directory.server.core.integ.state.TestServiceContext.shutdown;
+import static org.apache.directory.server.core.integ.state.TestServiceContext.cleanup;
+import static org.apache.directory.server.core.integ.state.TestServiceContext.destroy;
+import static org.apache.directory.server.core.integ.state.TestServiceContext.test;
+import static org.apache.directory.server.core.integ.state.TestServiceContext.shutdown;
 import org.junit.internal.runners.InitializationError;
 import org.junit.internal.runners.JUnit4ClassRunner;
 import org.junit.runner.Description;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/CiSuite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/CiSuite.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/CiSuite.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/CiSuite.java Sun Jan 20 08:59:10 2008
@@ -19,7 +19,9 @@
 package org.apache.directory.server.core.integ;
 
 
-import static org.apache.directory.server.core.integ.state.TestServiceContext.*;
+import static org.apache.directory.server.core.integ.state.TestServiceContext.shutdown;
+import static org.apache.directory.server.core.integ.state.TestServiceContext.cleanup;
+import static org.apache.directory.server.core.integ.state.TestServiceContext.destroy;
 import org.junit.internal.requests.IgnoredClassRunner;
 import org.junit.internal.runners.InitializationError;
 import org.junit.runner.Runner;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java Sun Jan 20 08:59:10 2008
@@ -19,6 +19,8 @@
 package org.apache.directory.server.core.integ;
 
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 
@@ -53,5 +55,5 @@
         }
     };
 
-    DirectoryService newInstance();
+    DirectoryService newInstance() throws NamingException;
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifFiles.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifFiles.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifFiles.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifFiles.java Sun Jan 20 08:59:10 2008
@@ -19,8 +19,14 @@
  */
 package org.apache.directory.server.core.integ.annotations;
 
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
 
-import java.lang.annotation.*;
 
 
 /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifs.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifs.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifs.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/ApplyLdifs.java Sun Jan 20 08:59:10 2008
@@ -19,8 +19,14 @@
  */
 package org.apache.directory.server.core.integ.annotations;
 
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
 
-import java.lang.annotation.*;
 
 
 /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/CleanupLevel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/CleanupLevel.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/CleanupLevel.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/CleanupLevel.java Sun Jan 20 08:59:10 2008
@@ -19,10 +19,14 @@
  */
 package org.apache.directory.server.core.integ.annotations;
 
-import org.apache.directory.server.core.integ.Level;
-
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
+import org.apache.directory.server.core.integ.Level;
 
 /**
  * An annotation to control the mode used to setup for a test.

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Factory.java Sun Jan 20 08:59:10 2008
@@ -19,8 +19,14 @@
  */
 package org.apache.directory.server.core.integ.annotations;
 
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
 
-import java.lang.annotation.*;
 
 
 /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Mode.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Mode.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Mode.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/annotations/Mode.java Sun Jan 20 08:59:10 2008
@@ -19,9 +19,15 @@
  */
 package org.apache.directory.server.core.integ.annotations;
 
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
 import org.apache.directory.server.core.integ.SetupMode;
 
-import java.lang.annotation.*;
 
 
 /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java Sun Jan 20 08:59:10 2008
@@ -18,6 +18,8 @@
  */
 package org.apache.directory.server.core.integ.state;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.integ.DirectoryServiceFactory;
 import org.apache.directory.server.core.integ.InheritableSettings;
 import org.apache.directory.server.core.integ.SetupMode;
@@ -51,7 +53,7 @@
     }
 
 
-    public void create( DirectoryServiceFactory factory )
+    public void create( DirectoryServiceFactory factory ) throws NamingException
     {
         LOG.debug( "calling create()" );
         context.setService( factory.newInstance() );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StartedRevertedState.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StartedRevertedState.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StartedRevertedState.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StartedRevertedState.java Sun Jan 20 08:59:10 2008
@@ -22,7 +22,6 @@
 import org.apache.directory.server.core.integ.DirectoryServiceFactory;
 import org.apache.directory.server.core.integ.InheritableSettings;
 import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.shared.ldap.NotImplementedException;
 import org.junit.internal.runners.TestClass;
 import org.junit.internal.runners.TestMethod;
 import org.junit.runner.notification.RunNotifier;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StoppedDirtyState.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StoppedDirtyState.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StoppedDirtyState.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StoppedDirtyState.java Sun Jan 20 08:59:10 2008
@@ -23,7 +23,6 @@
 import org.apache.directory.server.core.integ.InheritableSettings;
 import org.apache.directory.server.core.integ.SetupMode;
 import static org.apache.directory.server.core.integ.IntegrationUtils.doDelete;
-import org.apache.directory.shared.ldap.NotImplementedException;
 import org.junit.internal.runners.TestClass;
 import org.junit.internal.runners.TestMethod;
 import org.junit.runner.notification.RunNotifier;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StoppedPristineState.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StoppedPristineState.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StoppedPristineState.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/StoppedPristineState.java Sun Jan 20 08:59:10 2008
@@ -23,7 +23,6 @@
 import org.apache.directory.server.core.integ.InheritableSettings;
 import org.apache.directory.server.core.integ.SetupMode;
 import static org.apache.directory.server.core.integ.IntegrationUtils.doDelete;
-import org.apache.directory.shared.ldap.NotImplementedException;
 import org.junit.internal.runners.TestClass;
 import org.junit.internal.runners.TestMethod;
 import org.junit.runner.notification.RunNotifier;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java Sun Jan 20 08:59:10 2008
@@ -103,7 +103,7 @@
      *
      * @param factory the factory to use for creating a configured service
      */
-    public static void create( DirectoryServiceFactory factory )
+    public static void create( DirectoryServiceFactory factory ) throws NamingException
     {
         get().state.create( factory );
     }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java Sun Jan 20 08:59:10 2008
@@ -45,7 +45,7 @@
      *
      * @param factory the factory to use for creating a configured service
      */
-    void create( DirectoryServiceFactory factory );
+    void create( DirectoryServiceFactory factory ) throws NamingException;
 
 
     /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java Sun Jan 20 08:59:10 2008
@@ -27,9 +27,23 @@
 import org.apache.directory.server.core.integ.CiSuite;
 import org.apache.directory.server.core.integ.Level;
 import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.core.jndi.*;
+import org.apache.directory.server.core.integ.annotations.*;
+import org.apache.directory.server.core.jndi.AddIT;
+import org.apache.directory.server.core.jndi.CreateContextIT;
+import org.apache.directory.server.core.jndi.DIRSERVER169IT;
+import org.apache.directory.server.core.jndi.DIRSERVER759IT;
+import org.apache.directory.server.core.jndi.DIRSERVER783IT;
+import org.apache.directory.server.core.jndi.DIRSERVER791IT;
+import org.apache.directory.server.core.jndi.DestroyContextIT;
+import org.apache.directory.server.core.jndi.ExtensibleObjectIT;
+import org.apache.directory.server.core.jndi.ListIT;
+import org.apache.directory.server.core.jndi.ModifyContextIT;
+import org.apache.directory.server.core.jndi.ObjStateFactoryIT;
+import org.apache.directory.server.core.jndi.RFC2713IT;
+import org.apache.directory.server.core.jndi.ReferralIT;
+import org.apache.directory.server.core.jndi.RootDSEIT;
+import org.apache.directory.server.core.jndi.SearchIT;
+import org.apache.directory.server.core.jndi.UniqueMemberIT;
 import org.apache.directory.server.core.normalization.NormalizationServiceIT;
 import org.apache.directory.server.core.operational.OperationalAttributeServiceIT;
 import org.apache.directory.server.core.prefs.PreferencesIT;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java Sun Jan 20 08:59:10 2008
@@ -22,14 +22,15 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import static org.apache.directory.server.core.integ.IntegrationUtils.apply;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
+import static org.apache.directory.server.core.integ.IntegrationUtils.*;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java Sun Jan 20 08:59:10 2008
@@ -21,7 +21,11 @@
 
 
 import org.apache.directory.server.core.DirectoryService;
-import static org.apache.directory.server.core.authz.AutzIntegUtils.*;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createUser;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAs;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAsAdmin;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createAccessControlSubentry;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.addUserToGroup;
 import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java Sun Jan 20 08:59:10 2008
@@ -21,12 +21,15 @@
 
 
 import org.apache.directory.server.core.DirectoryService;
-import static org.apache.directory.server.core.authz.AutzIntegUtils.*;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createUser;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAs;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.addUserToGroup;
 import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.core.integ.annotations.Mode;
-import static org.junit.Assert.*;
+import org.apache.directory.server.core.integ.annotations.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.fail;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java Sun Jan 20 08:59:10 2008
@@ -27,7 +27,9 @@
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -124,11 +126,11 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         HashSet<String> set = new HashSet<String>();
-        NamingEnumeration list = sysRoot.search( "", "(objectClass=*)", controls );
+        NamingEnumeration<SearchResult> list = sysRoot.search( "", "(objectClass=*)", controls );
 
         while ( list.hasMore() )
         {
-            SearchResult result = ( SearchResult ) list.next();
+            SearchResult result = list.next();
             set.add( result.getName() );
         }
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java Sun Jan 20 08:59:10 2008
@@ -22,7 +22,9 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import static org.apache.directory.server.core.integ.IntegrationUtils.*;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.ldif.Entry;
@@ -145,12 +147,12 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        //noinspection MismatchedQueryAndUpdateOfCollection
         HashSet<String> set = new HashSet<String>();
-        NamingEnumeration list = sysRoot.search( "", "(objectClass=*)", controls );
+        NamingEnumeration<SearchResult> list = sysRoot.search( "", "(objectClass=*)", controls );
+        
         while ( list.hasMore() )
         {
-            SearchResult result = ( SearchResult ) list.next();
+            SearchResult result = list.next();
             set.add( result.getName() );
         }
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java Sun Jan 20 08:59:10 2008
@@ -24,14 +24,16 @@
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.Factory;
+import org.apache.directory.server.core.integ.annotations.*;
 import org.apache.directory.server.core.DirectoryService;
 import org.junit.runner.RunWith;
 
 import javax.naming.NamingException;
-import static org.junit.Assert.*;
+import static org.junit.Assert.fail;
 import org.junit.Test;
-import static org.apache.directory.server.core.authz.AutzIntegUtils.*;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createUser;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAs;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createAccessControlSubentry;
 
 
 /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java Sun Jan 20 08:59:10 2008
@@ -18,9 +18,10 @@
  */
 package org.apache.directory.server.core.authz;
 
+
 import org.apache.directory.server.core.integ.CiSuite;
 import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
+import org.apache.directory.server.core.integ.annotations.*;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java Sun Jan 20 08:59:10 2008
@@ -55,7 +55,7 @@
 
     public static class ServiceFactory implements DirectoryServiceFactory
     {
-        public DirectoryService newInstance()
+        public DirectoryService newInstance() 
         {
             DefaultDirectoryService service = new DefaultDirectoryService();
             service.setAccessControlEnabled( true );
@@ -68,7 +68,7 @@
 
     public static class DefaultServiceFactory implements DirectoryServiceFactory
     {
-        public DirectoryService newInstance()
+        public DirectoryService newInstance() 
         {
             DefaultDirectoryService service = new DefaultDirectoryService();
             service.setAccessControlEnabled( false );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java Sun Jan 20 08:59:10 2008
@@ -34,9 +34,14 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 import org.junit.Test;
-import static org.apache.directory.server.core.authz.AutzIntegUtils.*;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createUser;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAs;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAsAdmin;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createAccessControlSubentry;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.addUserToGroup;
 
 
 /**
@@ -172,11 +177,32 @@
         assertFalse( checkCanCompareTelephoneNumberAs( "billyd", "billyd", "ou=testou", "867-5309" ) );
 
         // now add a subentry that enables user billyd to compare an entry below ou=system
-        createAccessControlSubentry( "billydAdd", "{ " + "identificationTag \"addAci\", " + "precedence 14, "
-            + "authenticationLevel none, " + "itemOrUserFirst userFirst: { "
-            + "userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + "userPermissions { { "
-            + "protectedItems {entry, allUserAttributeTypesAndValues}, "
-            + "grantsAndDenials { grantCompare, grantRead, grantBrowse } } } } }" );
+        createAccessControlSubentry( "billydAdd", 
+            "{ " +
+            "  identificationTag \"addAci\", precedence 14, authenticationLevel none, itemOrUserFirst userFirst: " + 
+            "  { " +
+            "    userClasses " +
+            "    { " +
+            "      name " +
+            "      { " +
+            "        \"uid=billyd,ou=users,ou=system\" " +
+            "      } " +
+            "    }, " +
+            "    userPermissions " +
+            "    { " +
+            "      { " +
+            "        protectedItems " +
+            "        {" +
+            "          entry, allUserAttributeTypesAndValues" +
+            "        }, " +
+            "        grantsAndDenials " +
+            "        { " +
+            "          grantCompare, grantRead, grantBrowse " +
+            "        } " +
+            "      } " +
+            "    } " +
+            "  } " +
+            "}" );
 
         // should work now that billyd is authorized by name
         assertTrue( checkCanCompareTelephoneNumberAs( "billyd", "billyd", "ou=testou", "867-5309" ) );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java Sun Jan 20 08:59:10 2008
@@ -35,9 +35,14 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 import org.junit.Test;
-import static org.apache.directory.server.core.authz.AutzIntegUtils.*;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createUser;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAs;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAsAdmin;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createAccessControlSubentry;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.addUserToGroup;
 
 
 /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java Sun Jan 20 08:59:10 2008
@@ -40,9 +40,18 @@
 import java.util.List;
 import java.util.ArrayList;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 import org.junit.Test;
-import static org.apache.directory.server.core.authz.AutzIntegUtils.*;
+
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createUser;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAs;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAsAdmin;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createAccessControlSubentry;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.addUserToGroup;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.deleteAccessControlSubentry;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createGroup;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.changePresciptiveACI;
 
 
 /**

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java?rev=613608&r1=613607&r2=613608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java Sun Jan 20 08:59:10 2008
@@ -35,9 +35,18 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 import org.junit.Test;
-import static org.apache.directory.server.core.authz.AutzIntegUtils.*;
+
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createUser;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.deleteUser;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAs;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.getContextAsAdmin;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.createAccessControlSubentry;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.addUserToGroup;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.deleteAccessControlSubentry;
+import static org.apache.directory.server.core.authz.AutzIntegUtils.removeUserFromGroup;
 
 
 /**



Mime
View raw message