You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/02/12 06:51:22 UTC

svn commit: r377135 [8/36] - in /directory/sandbox/akarasulu/rc1: apacheds/core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ apacheds/core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ apacheds/core-shared/s...

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitor.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitor.java?rev=377135&r1=377134&r2=377135&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitor.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitor.java Sat Feb 11 21:50:03 2006
@@ -1,65 +1,65 @@
-/*
- *   Copyright 2004 The Apache Software Foundation
- *
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- *
- */
-package org.apache.directory.server.core.schema;
-
-
-import javax.naming.NamingException;
-
-import org.apache.directory.shared.ldap.schema.Syntax;
-
-
-/**
- * Monitor interface for a SyntaxRegistry.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
- */
-public interface SyntaxRegistryMonitor
-{
-    /**
-     * Monitors when a Syntax is registered successfully.
-     * 
-     * @param syntax the Syntax registered
-     */
-    void registered( Syntax syntax );
-
-
-    /**
-     * Monitors when a Syntax is successfully looked up.
-     * 
-     * @param syntax the Syntax looked up
-     */
-    void lookedUp( Syntax syntax );
-
-
-    /**
-     * Monitors when a lookup attempt fails.
-     * 
-     * @param oid the OID for the Syntax to lookup
-     * @param fault the exception to be thrown for the fault
-     */
-    void lookupFailed( String oid, NamingException fault );
-
-
-    /**
-     * Monitors when a registration attempt fails.
-     * 
-     * @param syntax the Syntax which failed registration
-     * @param fault the exception to be thrown for the fault
-     */
-    void registerFailed( Syntax syntax, NamingException fault );
-}
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server.core.schema;
+
+
+import javax.naming.NamingException;
+
+import org.apache.directory.shared.ldap.schema.Syntax;
+
+
+/**
+ * Monitor interface for a SyntaxRegistry.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public interface SyntaxRegistryMonitor
+{
+    /**
+     * Monitors when a Syntax is registered successfully.
+     * 
+     * @param syntax the Syntax registered
+     */
+    void registered( Syntax syntax );
+
+
+    /**
+     * Monitors when a Syntax is successfully looked up.
+     * 
+     * @param syntax the Syntax looked up
+     */
+    void lookedUp( Syntax syntax );
+
+
+    /**
+     * Monitors when a lookup attempt fails.
+     * 
+     * @param oid the OID for the Syntax to lookup
+     * @param fault the exception to be thrown for the fault
+     */
+    void lookupFailed( String oid, NamingException fault );
+
+
+    /**
+     * Monitors when a registration attempt fails.
+     * 
+     * @param syntax the Syntax which failed registration
+     * @param fault the exception to be thrown for the fault
+     */
+    void registerFailed( Syntax syntax, NamingException fault );
+}

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitor.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitorAdapter.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitorAdapter.java?rev=377135&r1=377134&r2=377135&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitorAdapter.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitorAdapter.java Sat Feb 11 21:50:03 2006
@@ -1,80 +1,80 @@
-/*
- *   Copyright 2004 The Apache Software Foundation
- *
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- *
- */
-package org.apache.directory.server.core.schema;
-
-
-import javax.naming.NamingException;
-
-import org.apache.directory.shared.ldap.schema.Syntax;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * An adapter for the SyntaxRegistry's monitor.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
- */
-public class SyntaxRegistryMonitorAdapter implements SyntaxRegistryMonitor
-{
-    private static final Logger log = LoggerFactory.getLogger( SyntaxRegistryMonitorAdapter.class );
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.schema.SyntaxRegistryMonitor#registered(
-     * org.apache.eve.schema.Syntax)
-     */
-    public void registered( Syntax syntax )
-    {
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.schema.SyntaxRegistryMonitor#lookedUp(
-     * org.apache.eve.schema.Syntax)
-     */
-    public void lookedUp( Syntax syntax )
-    {
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.schema.SyntaxRegistryMonitor#lookupFailed(
-     * java.lang.String, javax.naming.NamingException)
-     */
-    public void lookupFailed( String oid, NamingException fault )
-    {
-        if ( fault != null )
-        {
-            log.warn( "Failed to look up the syntax: " + oid, fault );
-        }
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.schema.SyntaxRegistryMonitor#registerFailed(
-     * org.apache.eve.schema.Syntax, javax.naming.NamingException)
-     */
-    public void registerFailed( Syntax syntax, NamingException fault )
-    {
-        if ( fault != null )
-        {
-            log.warn( "Failed to register a syntax: " + syntax, fault );
-        }
-    }
-}
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server.core.schema;
+
+
+import javax.naming.NamingException;
+
+import org.apache.directory.shared.ldap.schema.Syntax;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * An adapter for the SyntaxRegistry's monitor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class SyntaxRegistryMonitorAdapter implements SyntaxRegistryMonitor
+{
+    private static final Logger log = LoggerFactory.getLogger( SyntaxRegistryMonitorAdapter.class );
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.server.schema.SyntaxRegistryMonitor#registered(
+     * org.apache.eve.schema.Syntax)
+     */
+    public void registered( Syntax syntax )
+    {
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.server.schema.SyntaxRegistryMonitor#lookedUp(
+     * org.apache.eve.schema.Syntax)
+     */
+    public void lookedUp( Syntax syntax )
+    {
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.server.schema.SyntaxRegistryMonitor#lookupFailed(
+     * java.lang.String, javax.naming.NamingException)
+     */
+    public void lookupFailed( String oid, NamingException fault )
+    {
+        if ( fault != null )
+        {
+            log.warn( "Failed to look up the syntax: " + oid, fault );
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.server.schema.SyntaxRegistryMonitor#registerFailed(
+     * org.apache.eve.schema.Syntax, javax.naming.NamingException)
+     */
+    public void registerFailed( Syntax syntax, NamingException fault )
+    {
+        if ( fault != null )
+        {
+            log.warn( "Failed to register a syntax: " + syntax, fault );
+        }
+    }
+}

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitorAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SyntaxRegistryMonitorAdapter.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/AbstractBootstrapProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/AbstractBootstrapProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApacheComparatorProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApacheComparatorProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApacheMatchingRuleProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApacheMatchingRuleProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApacheNormalizerProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApacheNormalizerProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapAttributeTypeRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapComparatorRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapComparatorRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitContentRuleRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitContentRuleRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitStructureRuleRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapDitStructureRuleRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java?rev=377135&r1=377134&r2=377135&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java Sat Feb 11 21:50:03 2006
@@ -1,182 +1,182 @@
-/*
- *   Copyright 2004 The Apache Software Foundation
- *
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- *
- */
-package org.apache.directory.server.core.schema.bootstrap;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.naming.NamingException;
-
-import org.apache.directory.server.core.schema.MatchingRuleRegistry;
-import org.apache.directory.server.core.schema.MatchingRuleRegistryMonitor;
-import org.apache.directory.server.core.schema.MatchingRuleRegistryMonitorAdapter;
-import org.apache.directory.server.core.schema.OidRegistry;
-import org.apache.directory.shared.ldap.schema.MatchingRule;
-
-
-/**
- * A MatchingRuleRegistry service used to lookup matching rules by OID.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
- */
-public class BootstrapMatchingRuleRegistry implements MatchingRuleRegistry
-{
-    /** a map using an OID for the key and a MatchingRule for the value */
-    private final Map byOid;
-    /** maps an OID to a schema name*/
-    private final Map oidToSchema;
-    /** the registry used to resolve names to OIDs */
-    private final OidRegistry oidRegistry;
-    /** a monitor used to track noteable registry events */
-    private MatchingRuleRegistryMonitor monitor = null;
-
-
-    // ------------------------------------------------------------------------
-    // C O N S T R U C T O R S
-    // ------------------------------------------------------------------------
-
-    /**
-     * Creates a BootstrapMatchingRuleRegistry using existing MatchingRulees
-     * for lookups.
-     * 
-     */
-    public BootstrapMatchingRuleRegistry(OidRegistry oidRegistry)
-    {
-        this.oidToSchema = new HashMap();
-        this.oidRegistry = oidRegistry;
-        this.byOid = new HashMap();
-        this.monitor = new MatchingRuleRegistryMonitorAdapter();
-    }
-
-
-    // ------------------------------------------------------------------------
-    // MatchingRuleRegistry interface methods
-    // ------------------------------------------------------------------------
-
-    /**
-     * @see org.apache.directory.server.core.schema.MatchingRuleRegistry#lookup(String)
-     */
-    public MatchingRule lookup( String id ) throws NamingException
-    {
-        id = oidRegistry.getOid( id );
-
-        if ( byOid.containsKey( id ) )
-        {
-            MatchingRule MatchingRule = ( MatchingRule ) byOid.get( id );
-            monitor.lookedUp( MatchingRule );
-            return MatchingRule;
-        }
-
-        NamingException fault = new NamingException( "Unknown MatchingRule OID " + id );
-        monitor.lookupFailed( id, fault );
-        throw fault;
-    }
-
-
-    /**
-     * @see MatchingRuleRegistry#register(String, MatchingRule)
-     */
-    public void register( String schema, MatchingRule matchingRule ) throws NamingException
-    {
-        if ( byOid.containsKey( matchingRule.getOid() ) )
-        {
-            NamingException e = new NamingException( "matchingRule w/ OID " + matchingRule.getOid()
-                + " has already been registered!" );
-            monitor.registerFailed( matchingRule, e );
-            throw e;
-        }
-
-        oidToSchema.put( matchingRule.getOid(), schema );
-
-        String[] names = matchingRule.getNames();
-        for ( int ii = 0; ii < names.length; ii++ )
-        {
-            oidRegistry.register( names[ii], matchingRule.getOid() );
-        }
-
-        byOid.put( matchingRule.getOid(), matchingRule );
-        monitor.registered( matchingRule );
-    }
-
-
-    /**
-     * @see org.apache.directory.server.core.schema.MatchingRuleRegistry#hasMatchingRule(String)
-     */
-    public boolean hasMatchingRule( String id )
-    {
-        if ( oidRegistry.hasOid( id ) )
-        {
-            try
-            {
-                return byOid.containsKey( oidRegistry.getOid( id ) );
-            }
-            catch ( NamingException e )
-            {
-                return false;
-            }
-        }
-
-        return false;
-    }
-
-
-    public String getSchemaName( String id ) throws NamingException
-    {
-        id = oidRegistry.getOid( id );
-        if ( oidToSchema.containsKey( id ) )
-        {
-            return ( String ) oidToSchema.get( id );
-        }
-
-        throw new NamingException( "OID " + id + " not found in oid to " + "schema name map!" );
-    }
-
-
-    // ------------------------------------------------------------------------
-    // package friendly monitor methods
-    // ------------------------------------------------------------------------
-
-    /**
-     * Gets the monitor for this registry.
-     * 
-     * @return the monitor
-     */
-    MatchingRuleRegistryMonitor getMonitor()
-    {
-        return monitor;
-    }
-
-
-    /**
-     * Sets the monitor for this registry.
-     * 
-     * @param monitor the monitor to set
-     */
-    void setMonitor( MatchingRuleRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
-    public Iterator list()
-    {
-        return byOid.values().iterator();
-    }
-}
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server.core.schema.bootstrap;
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.naming.NamingException;
+
+import org.apache.directory.server.core.schema.MatchingRuleRegistry;
+import org.apache.directory.server.core.schema.MatchingRuleRegistryMonitor;
+import org.apache.directory.server.core.schema.MatchingRuleRegistryMonitorAdapter;
+import org.apache.directory.server.core.schema.OidRegistry;
+import org.apache.directory.shared.ldap.schema.MatchingRule;
+
+
+/**
+ * A MatchingRuleRegistry service used to lookup matching rules by OID.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class BootstrapMatchingRuleRegistry implements MatchingRuleRegistry
+{
+    /** a map using an OID for the key and a MatchingRule for the value */
+    private final Map byOid;
+    /** maps an OID to a schema name*/
+    private final Map oidToSchema;
+    /** the registry used to resolve names to OIDs */
+    private final OidRegistry oidRegistry;
+    /** a monitor used to track noteable registry events */
+    private MatchingRuleRegistryMonitor monitor = null;
+
+
+    // ------------------------------------------------------------------------
+    // C O N S T R U C T O R S
+    // ------------------------------------------------------------------------
+
+    /**
+     * Creates a BootstrapMatchingRuleRegistry using existing MatchingRulees
+     * for lookups.
+     * 
+     */
+    public BootstrapMatchingRuleRegistry(OidRegistry oidRegistry)
+    {
+        this.oidToSchema = new HashMap();
+        this.oidRegistry = oidRegistry;
+        this.byOid = new HashMap();
+        this.monitor = new MatchingRuleRegistryMonitorAdapter();
+    }
+
+
+    // ------------------------------------------------------------------------
+    // MatchingRuleRegistry interface methods
+    // ------------------------------------------------------------------------
+
+    /**
+     * @see org.apache.directory.server.core.schema.MatchingRuleRegistry#lookup(String)
+     */
+    public MatchingRule lookup( String id ) throws NamingException
+    {
+        id = oidRegistry.getOid( id );
+
+        if ( byOid.containsKey( id ) )
+        {
+            MatchingRule MatchingRule = ( MatchingRule ) byOid.get( id );
+            monitor.lookedUp( MatchingRule );
+            return MatchingRule;
+        }
+
+        NamingException fault = new NamingException( "Unknown MatchingRule OID " + id );
+        monitor.lookupFailed( id, fault );
+        throw fault;
+    }
+
+
+    /**
+     * @see MatchingRuleRegistry#register(String, MatchingRule)
+     */
+    public void register( String schema, MatchingRule matchingRule ) throws NamingException
+    {
+        if ( byOid.containsKey( matchingRule.getOid() ) )
+        {
+            NamingException e = new NamingException( "matchingRule w/ OID " + matchingRule.getOid()
+                + " has already been registered!" );
+            monitor.registerFailed( matchingRule, e );
+            throw e;
+        }
+
+        oidToSchema.put( matchingRule.getOid(), schema );
+
+        String[] names = matchingRule.getNames();
+        for ( int ii = 0; ii < names.length; ii++ )
+        {
+            oidRegistry.register( names[ii], matchingRule.getOid() );
+        }
+
+        byOid.put( matchingRule.getOid(), matchingRule );
+        monitor.registered( matchingRule );
+    }
+
+
+    /**
+     * @see org.apache.directory.server.core.schema.MatchingRuleRegistry#hasMatchingRule(String)
+     */
+    public boolean hasMatchingRule( String id )
+    {
+        if ( oidRegistry.hasOid( id ) )
+        {
+            try
+            {
+                return byOid.containsKey( oidRegistry.getOid( id ) );
+            }
+            catch ( NamingException e )
+            {
+                return false;
+            }
+        }
+
+        return false;
+    }
+
+
+    public String getSchemaName( String id ) throws NamingException
+    {
+        id = oidRegistry.getOid( id );
+        if ( oidToSchema.containsKey( id ) )
+        {
+            return ( String ) oidToSchema.get( id );
+        }
+
+        throw new NamingException( "OID " + id + " not found in oid to " + "schema name map!" );
+    }
+
+
+    // ------------------------------------------------------------------------
+    // package friendly monitor methods
+    // ------------------------------------------------------------------------
+
+    /**
+     * Gets the monitor for this registry.
+     * 
+     * @return the monitor
+     */
+    MatchingRuleRegistryMonitor getMonitor()
+    {
+        return monitor;
+    }
+
+
+    /**
+     * Sets the monitor for this registry.
+     * 
+     * @param monitor the monitor to set
+     */
+    void setMonitor( MatchingRuleRegistryMonitor monitor )
+    {
+        this.monitor = monitor;
+    }
+
+
+    public Iterator list()
+    {
+        return byOid.values().iterator();
+    }
+}

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapMatchingRuleUseRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNameFormRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNameFormRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNormalizerRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapNormalizerRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectClassRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectClassRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectFactoryRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapObjectFactoryRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapRegistries.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapRegistries.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSchemaLoader.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapStateFactoryRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapStateFactoryRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxCheckerRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxCheckerRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java?rev=377135&r1=377134&r2=377135&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java Sat Feb 11 21:50:03 2006
@@ -1,175 +1,175 @@
-/*
- *   Copyright 2004 The Apache Software Foundation
- *
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- *
- */
-package org.apache.directory.server.core.schema.bootstrap;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.naming.NamingException;
-
-import org.apache.directory.server.core.schema.OidRegistry;
-import org.apache.directory.server.core.schema.SyntaxRegistry;
-import org.apache.directory.server.core.schema.SyntaxRegistryMonitor;
-import org.apache.directory.server.core.schema.SyntaxRegistryMonitorAdapter;
-import org.apache.directory.shared.ldap.schema.Syntax;
-
-
-/**
- * A SyntaxRegistry service available during server startup when other resources
- * like a syntax backing store is unavailable.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
- */
-public class BootstrapSyntaxRegistry implements SyntaxRegistry
-{
-    /** a map of entries using an OID for the key and a Syntax for the value */
-    private final Map byOid;
-    /** maps an OID to a schema name*/
-    private final Map oidToSchema;
-    /** the OID oidRegistry this oidRegistry uses to register new syntax OIDs */
-    private final OidRegistry oidRegistry;
-    /** a monitor used to track noteable oidRegistry events */
-    private SyntaxRegistryMonitor monitor = null;
-
-
-    // ------------------------------------------------------------------------
-    // C O N S T R U C T O R S
-    // ------------------------------------------------------------------------
-
-    /**
-     * Creates a BootstrapSyntaxRegistry.
-     */
-    public BootstrapSyntaxRegistry(OidRegistry registry)
-    {
-        this.oidRegistry = registry;
-        this.byOid = new HashMap();
-        this.oidToSchema = new HashMap();
-        this.monitor = new SyntaxRegistryMonitorAdapter();
-    }
-
-
-    // ------------------------------------------------------------------------
-    // SyntaxRegistry interface methods
-    // ------------------------------------------------------------------------
-
-    /**
-     * @see org.apache.directory.server.core.schema.SyntaxRegistry#lookup(java.lang.String)
-     */
-    public Syntax lookup( String id ) throws NamingException
-    {
-        id = oidRegistry.getOid( id );
-
-        if ( byOid.containsKey( id ) )
-        {
-            Syntax syntax = ( Syntax ) byOid.get( id );
-            monitor.lookedUp( syntax );
-            return syntax;
-        }
-
-        NamingException fault = new NamingException( "Unknown syntax OID " + id );
-        monitor.lookupFailed( id, fault );
-        throw fault;
-    }
-
-
-    /**
-     * @see org.apache.directory.server.core.schema.SyntaxRegistry#register(String,Syntax)
-     */
-    public void register( String schema, Syntax syntax ) throws NamingException
-    {
-        if ( byOid.containsKey( syntax.getOid() ) )
-        {
-            NamingException e = new NamingException( "syntax w/ OID " + syntax.getOid()
-                + " has already been registered!" );
-            monitor.registerFailed( syntax, e );
-            throw e;
-        }
-
-        oidRegistry.register( syntax.getName(), syntax.getOid() );
-        byOid.put( syntax.getOid(), syntax );
-        oidToSchema.put( syntax.getOid(), schema );
-        monitor.registered( syntax );
-    }
-
-
-    /**
-     * @see org.apache.directory.server.core.schema.SyntaxRegistry#hasSyntax(java.lang.String)
-     */
-    public boolean hasSyntax( String id )
-    {
-        if ( oidRegistry.hasOid( id ) )
-        {
-            try
-            {
-                return byOid.containsKey( oidRegistry.getOid( id ) );
-            }
-            catch ( NamingException e )
-            {
-                return false;
-            }
-        }
-
-        return false;
-    }
-
-
-    public String getSchemaName( String id ) throws NamingException
-    {
-        id = oidRegistry.getOid( id );
-        if ( oidToSchema.containsKey( id ) )
-        {
-            return ( String ) oidToSchema.get( id );
-        }
-
-        throw new NamingException( "OID " + id + " not found in oid to " + "schema name map!" );
-    }
-
-
-    // ------------------------------------------------------------------------
-    // package friendly monitor methods
-    // ------------------------------------------------------------------------
-
-    /**
-     * Gets the monitor for this oidRegistry.
-     * 
-     * @return the monitor
-     */
-    SyntaxRegistryMonitor getMonitor()
-    {
-        return monitor;
-    }
-
-
-    /**
-     * Sets the monitor for this oidRegistry.
-     * 
-     * @param monitor the monitor to set
-     */
-    void setMonitor( SyntaxRegistryMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
-    public Iterator list()
-    {
-        return byOid.values().iterator();
-    }
-}
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server.core.schema.bootstrap;
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.naming.NamingException;
+
+import org.apache.directory.server.core.schema.OidRegistry;
+import org.apache.directory.server.core.schema.SyntaxRegistry;
+import org.apache.directory.server.core.schema.SyntaxRegistryMonitor;
+import org.apache.directory.server.core.schema.SyntaxRegistryMonitorAdapter;
+import org.apache.directory.shared.ldap.schema.Syntax;
+
+
+/**
+ * A SyntaxRegistry service available during server startup when other resources
+ * like a syntax backing store is unavailable.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class BootstrapSyntaxRegistry implements SyntaxRegistry
+{
+    /** a map of entries using an OID for the key and a Syntax for the value */
+    private final Map byOid;
+    /** maps an OID to a schema name*/
+    private final Map oidToSchema;
+    /** the OID oidRegistry this oidRegistry uses to register new syntax OIDs */
+    private final OidRegistry oidRegistry;
+    /** a monitor used to track noteable oidRegistry events */
+    private SyntaxRegistryMonitor monitor = null;
+
+
+    // ------------------------------------------------------------------------
+    // C O N S T R U C T O R S
+    // ------------------------------------------------------------------------
+
+    /**
+     * Creates a BootstrapSyntaxRegistry.
+     */
+    public BootstrapSyntaxRegistry(OidRegistry registry)
+    {
+        this.oidRegistry = registry;
+        this.byOid = new HashMap();
+        this.oidToSchema = new HashMap();
+        this.monitor = new SyntaxRegistryMonitorAdapter();
+    }
+
+
+    // ------------------------------------------------------------------------
+    // SyntaxRegistry interface methods
+    // ------------------------------------------------------------------------
+
+    /**
+     * @see org.apache.directory.server.core.schema.SyntaxRegistry#lookup(java.lang.String)
+     */
+    public Syntax lookup( String id ) throws NamingException
+    {
+        id = oidRegistry.getOid( id );
+
+        if ( byOid.containsKey( id ) )
+        {
+            Syntax syntax = ( Syntax ) byOid.get( id );
+            monitor.lookedUp( syntax );
+            return syntax;
+        }
+
+        NamingException fault = new NamingException( "Unknown syntax OID " + id );
+        monitor.lookupFailed( id, fault );
+        throw fault;
+    }
+
+
+    /**
+     * @see org.apache.directory.server.core.schema.SyntaxRegistry#register(String,Syntax)
+     */
+    public void register( String schema, Syntax syntax ) throws NamingException
+    {
+        if ( byOid.containsKey( syntax.getOid() ) )
+        {
+            NamingException e = new NamingException( "syntax w/ OID " + syntax.getOid()
+                + " has already been registered!" );
+            monitor.registerFailed( syntax, e );
+            throw e;
+        }
+
+        oidRegistry.register( syntax.getName(), syntax.getOid() );
+        byOid.put( syntax.getOid(), syntax );
+        oidToSchema.put( syntax.getOid(), schema );
+        monitor.registered( syntax );
+    }
+
+
+    /**
+     * @see org.apache.directory.server.core.schema.SyntaxRegistry#hasSyntax(java.lang.String)
+     */
+    public boolean hasSyntax( String id )
+    {
+        if ( oidRegistry.hasOid( id ) )
+        {
+            try
+            {
+                return byOid.containsKey( oidRegistry.getOid( id ) );
+            }
+            catch ( NamingException e )
+            {
+                return false;
+            }
+        }
+
+        return false;
+    }
+
+
+    public String getSchemaName( String id ) throws NamingException
+    {
+        id = oidRegistry.getOid( id );
+        if ( oidToSchema.containsKey( id ) )
+        {
+            return ( String ) oidToSchema.get( id );
+        }
+
+        throw new NamingException( "OID " + id + " not found in oid to " + "schema name map!" );
+    }
+
+
+    // ------------------------------------------------------------------------
+    // package friendly monitor methods
+    // ------------------------------------------------------------------------
+
+    /**
+     * Gets the monitor for this oidRegistry.
+     * 
+     * @return the monitor
+     */
+    SyntaxRegistryMonitor getMonitor()
+    {
+        return monitor;
+    }
+
+
+    /**
+     * Sets the monitor for this oidRegistry.
+     * 
+     * @param monitor the monitor to set
+     */
+    void setMonitor( SyntaxRegistryMonitor monitor )
+    {
+        this.monitor = monitor;
+    }
+
+
+    public Iterator list()
+    {
+        return byOid.values().iterator();
+    }
+}

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapSyntaxRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/InetorgpersonComparatorProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/InetorgpersonComparatorProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/InetorgpersonMatchingRuleProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/InetorgpersonMatchingRuleProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/InetorgpersonNormalizerProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/InetorgpersonNormalizerProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisComparatorProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisComparatorProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisMatchingRuleProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisMatchingRuleProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisNormalizerProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisNormalizerProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisSyntaxCheckerProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisSyntaxCheckerProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisSyntaxProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/NisSyntaxProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ProducerCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ProducerCallback.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemComparatorProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemComparatorProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemMatchingRuleProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemMatchingRuleProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemNormalizerProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemNormalizerProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemSyntaxCheckerProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemSyntaxCheckerProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemSyntaxProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemSyntaxProducer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/RefinementEvaluator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java?rev=377135&r1=377134&r2=377135&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java Sat Feb 11 21:50:03 2006
@@ -1,69 +1,69 @@
-/*
- *   Copyright 2004 The Apache Software Foundation
- *
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- *
- */
-
-package org.apache.directory.server.core.authn;
-
-
-import java.security.NoSuchAlgorithmException;
-
-import org.apache.directory.server.core.authn.SimpleAuthenticator;
-
-import junit.framework.TestCase;
-
-
-/**
- * Test case for helper methods within SimpleAuthenticator.
- * 
- * @author Apache Directory Project (dev@directory.apache.org)
- */
-public class SimpleAuthenticatorOneWayEncryptedTest extends TestCase
-{
-    private SimpleAuthenticator auth = null;
-
-
-    protected void setUp() throws Exception
-    {
-        super.setUp();
-        this.auth = new SimpleAuthenticator();
-    }
-
-
-    public void testGetAlgorithmForHashedPassword()
-    {
-        String digestetValue = "{SHA}LhkDrSoM6qr0fW6hzlfOJQW61tc=";
-        assertEquals( "SHA", auth.getAlgorithmForHashedPassword( digestetValue ) );
-        assertEquals( "SHA", auth.getAlgorithmForHashedPassword( digestetValue.getBytes() ) );
-
-        String noAlgorithm = "Secret1!";
-        assertEquals( null, auth.getAlgorithmForHashedPassword( noAlgorithm ) );
-        assertEquals( null, auth.getAlgorithmForHashedPassword( noAlgorithm.getBytes() ) );
-
-        String unknownAlgorithm = "{XYZ}LhkDrSoM6qr0fW6hzlfOJQW61tc=";
-        assertEquals( null, auth.getAlgorithmForHashedPassword( unknownAlgorithm ) );
-        assertEquals( null, auth.getAlgorithmForHashedPassword( unknownAlgorithm.getBytes() ) );
-    }
-
-
-    public void testCreateDigestedPassword() throws NoSuchAlgorithmException
-    {
-        String pwd = "Secret1!";
-        String expected = "{SHA}znbJr3+tymFoQD4+Njh4ITtI7Cc=";
-        String digested = auth.createDigestedPassword( "SHA", pwd );
-
-        assertEquals( expected, digested );
-    }
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.directory.server.core.authn;
+
+
+import java.security.NoSuchAlgorithmException;
+
+import org.apache.directory.server.core.authn.SimpleAuthenticator;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Test case for helper methods within SimpleAuthenticator.
+ * 
+ * @author Apache Directory Project (dev@directory.apache.org)
+ */
+public class SimpleAuthenticatorOneWayEncryptedTest extends TestCase
+{
+    private SimpleAuthenticator auth = null;
+
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        this.auth = new SimpleAuthenticator();
+    }
+
+
+    public void testGetAlgorithmForHashedPassword()
+    {
+        String digestetValue = "{SHA}LhkDrSoM6qr0fW6hzlfOJQW61tc=";
+        assertEquals( "SHA", auth.getAlgorithmForHashedPassword( digestetValue ) );
+        assertEquals( "SHA", auth.getAlgorithmForHashedPassword( digestetValue.getBytes() ) );
+
+        String noAlgorithm = "Secret1!";
+        assertEquals( null, auth.getAlgorithmForHashedPassword( noAlgorithm ) );
+        assertEquals( null, auth.getAlgorithmForHashedPassword( noAlgorithm.getBytes() ) );
+
+        String unknownAlgorithm = "{XYZ}LhkDrSoM6qr0fW6hzlfOJQW61tc=";
+        assertEquals( null, auth.getAlgorithmForHashedPassword( unknownAlgorithm ) );
+        assertEquals( null, auth.getAlgorithmForHashedPassword( unknownAlgorithm.getBytes() ) );
+    }
+
+
+    public void testCreateDigestedPassword() throws NoSuchAlgorithmException
+    {
+        String pwd = "Secret1!";
+        String expected = "{SHA}znbJr3+tymFoQD4+Njh4ITtI7Cc=";
+        String digested = auth.createDigestedPassword( "SHA", pwd );
+
+        assertEquals( expected, digested );
+    }
 }

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyOidRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/DummyOidRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java?rev=377135&r1=377134&r2=377135&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java Sat Feb 11 21:50:03 2006
@@ -1,91 +1,91 @@
-/*
- *   @(#) $Id$
- *
- *   Copyright 2004 The Apache Software Foundation
- *
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
- *
- */
-package org.apache.directory.server.core.authz.support;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.directory.server.core.authz.support.HighestPrecedenceFilter;
-import org.apache.directory.shared.ldap.aci.ACITuple;
-import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
-
-
-/**
- * Tests {@link HighestPrecedenceFilter}.
- *
- * @author The Apache Directory Project
- * @version $Rev$, $Date$
- *
- */
-public class HighestPrecedenceFilterTest extends TestCase
-{
-    private static final Collection EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList() );
-    private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() );
-
-
-    public void testZeroTuple() throws Exception
-    {
-        HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
-        Assert.assertEquals( 0, filter.filter( EMPTY_COLLECTION, null, null, null, null, null, null, null, null, null,
-            null, null ).size() );
-    }
-
-
-    public void testOneTuple() throws Exception
-    {
-        HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
-        Collection tuples = new ArrayList();
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true, 10 ) );
-        tuples = Collections.unmodifiableCollection( tuples );
-        Assert.assertEquals( tuples, filter.filter( tuples, null, null, null, null, null, null, null, null, null, null,
-            null ) );
-    }
-
-
-    public void testMoreThanOneTuples() throws Exception
-    {
-        final int MAX_PRECEDENCE = 10;
-        HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
-        Collection tuples = new ArrayList();
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
-            MAX_PRECEDENCE ) );
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
-            MAX_PRECEDENCE / 2 ) );
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
-            MAX_PRECEDENCE ) );
-        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
-            MAX_PRECEDENCE / 3 ) );
-
-        tuples = filter.filter( tuples, null, null, null, null, null, null, null, null, null, null, null );
-
-        for ( Iterator i = tuples.iterator(); i.hasNext(); )
-        {
-            ACITuple tuple = ( ACITuple ) i.next();
-            Assert.assertEquals( MAX_PRECEDENCE, tuple.getPrecedence() );
-        }
-    }
-}
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server.core.authz.support;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.directory.server.core.authz.support.HighestPrecedenceFilter;
+import org.apache.directory.shared.ldap.aci.ACITuple;
+import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+
+
+/**
+ * Tests {@link HighestPrecedenceFilter}.
+ *
+ * @author The Apache Directory Project
+ * @version $Rev$, $Date$
+ *
+ */
+public class HighestPrecedenceFilterTest extends TestCase
+{
+    private static final Collection EMPTY_COLLECTION = Collections.unmodifiableCollection( new ArrayList() );
+    private static final Set EMPTY_SET = Collections.unmodifiableSet( new HashSet() );
+
+
+    public void testZeroTuple() throws Exception
+    {
+        HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
+        Assert.assertEquals( 0, filter.filter( EMPTY_COLLECTION, null, null, null, null, null, null, null, null, null,
+            null, null ).size() );
+    }
+
+
+    public void testOneTuple() throws Exception
+    {
+        HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
+        Collection tuples = new ArrayList();
+        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true, 10 ) );
+        tuples = Collections.unmodifiableCollection( tuples );
+        Assert.assertEquals( tuples, filter.filter( tuples, null, null, null, null, null, null, null, null, null, null,
+            null ) );
+    }
+
+
+    public void testMoreThanOneTuples() throws Exception
+    {
+        final int MAX_PRECEDENCE = 10;
+        HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
+        Collection tuples = new ArrayList();
+        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
+            MAX_PRECEDENCE ) );
+        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
+            MAX_PRECEDENCE / 2 ) );
+        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
+            MAX_PRECEDENCE ) );
+        tuples.add( new ACITuple( EMPTY_COLLECTION, AuthenticationLevel.NONE, EMPTY_COLLECTION, EMPTY_SET, true,
+            MAX_PRECEDENCE / 3 ) );
+
+        tuples = filter.filter( tuples, null, null, null, null, null, null, null, null, null, null, null );
+
+        for ( Iterator i = tuples.iterator(); i.hasNext(); )
+        {
+            ACITuple tuple = ( ACITuple ) i.next();
+            Assert.assertEquals( MAX_PRECEDENCE, tuple.getPrecedence() );
+        }
+    }
+}

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/rc1/apacheds/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sat Feb 11 21:50:03 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id