Author: akarasulu Date: Mon Sep 27 20:10:12 2004 New Revision: 47376 Modified: incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultMatchingRuleRegistry.java incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultOidRegistry.java incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultSyntaxRegistry.java Log: code cleanup
Modified: incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultMatchingRuleRegistry.java ============================================================================== --- incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultMatchingRuleRegistry.java (original) +++ incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultMatchingRuleRegistry.java Mon Sep 27 20:10:12 2004 @@ -32,7 +32,7 @@ * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a> * @version $Rev$ */ -public class BootstrapMatchingRuleRegistry implements MatchingRuleRegistry +public class DefaultMatchingRuleRegistry implements MatchingRuleRegistry { /** a map using an OID for the key and a MatchingRule for the value */ private final Map matchingRules; @@ -46,13 +46,12 @@ /** - * Creates a BootstrapMatchingRuleRegistry using existing MatchingRulees + * Creates a DefaultMatchingRuleRegistry using existing MatchingRulees * for lookups. * - * @param matchingRules a map of OIDs to their respective MatchingRule - * objects + * @param matchingRules a map of OIDs to their respective MatchingRule objs */ - public BootstrapMatchingRuleRegistry( MatchingRule[] matchingRules, + public DefaultMatchingRuleRegistry( MatchingRule[] matchingRules, OidRegistry registry ) { this ( matchingRules, registry, @@ -61,13 +60,12 @@ /** - * Creates a BootstrapMatchingRuleRegistry using existing MatchingRulees + * Creates a DefaultMatchingRuleRegistry using existing MatchingRulees * for lookups. * - * @param matchingRules a map of OIDs to their respective MatchingRule - * objects + * @param matchingRules a map of OIDs to their respective MatchingRule objs */ - public BootstrapMatchingRuleRegistry( MatchingRule[] matchingRules, + public DefaultMatchingRuleRegistry( MatchingRule[] matchingRules, OidRegistry registry, MatchingRuleRegistryMonitor monitor ) { @@ -98,7 +96,7 @@ /** - * @see org.apache.eve.schema.MatchingRuleRegistry#lookup(java.lang.String) + * @see org.apache.eve.schema.MatchingRuleRegistry#lookup(String) */ public MatchingRule lookup( String oid ) throws NamingException { @@ -132,8 +130,7 @@ /** - * @see org.apache.eve.schema.MatchingRuleRegistry#hasMatchingRule( - * java.lang.String) + * @see org.apache.eve.schema.MatchingRuleRegistry#hasMatchingRule(String) */ public boolean hasMatchingRule( String oid ) { Modified: incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultOidRegistry.java ============================================================================== --- incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultOidRegistry.java (original) +++ incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultOidRegistry.java Mon Sep 27 20:10:12 2004 @@ -1,213 +1,179 @@ /* + * 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.eve.schema; + - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact [EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see <http://www.apache.org/>. - -*/ -package org.apache.eve.schema ; - -import java.util.List ; -import java.util.Iterator ; -import java.util.ArrayList ; -import java.util.Hashtable ; -import java.util.Collections ; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Collections; -import javax.naming.NamingException ; +import javax.naming.NamingException; /** * Default OID registry implementation used to resolve a schema object OID * to a name and vice-versa. * - * @author <a href="mailto:[EMAIL PROTECTED]">Alex Karasulu</a> - * @author $Author$ + * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a> * @version $Rev$ */ public class DefaultOidRegistry implements OidRegistry { /** Maps OID to a name or a list of names if more than one name exists */ - private Hashtable m_byOid = new Hashtable() ; + private Hashtable byOid = new Hashtable(); /** Maps several names to an OID */ - private Hashtable m_byName = new Hashtable() ; + private Hashtable byName = new Hashtable(); /** Default OidRegistryMonitor */ - private OidRegistryMonitor m_monitor = null ; + private OidRegistryMonitor monitor = null; /** - * @see org.apache.ldap.server.schema.OidRegistry#getOid(java.lang.String) + * @see org.apache.eve.schema.OidRegistry#getOid(java.lang.String) */ - public String getOid( String a_name ) throws NamingException + public String getOid( String name ) throws NamingException { - /* If a_name is an OID than we return it back since inherently the + /* If name is an OID than we return it back since inherently the * OID is another name for the object referred to by OID and the * caller does not know that the argument is an OID String. */ - if ( Character.isDigit( a_name.charAt( 0 ) ) - && m_byOid.containsKey( a_name ) ) + if ( Character.isDigit( name.charAt( 0 ) ) + && byOid.containsKey( name ) ) { - m_monitor.getOidWithOid( a_name ) ; - return a_name ; + monitor.getOidWithOid( name ); + return name; } - // If a_name is mapped to a OID already return OID - if ( m_byName.containsKey( a_name ) ) + // If name is mapped to a OID already return OID + if ( byName.containsKey( name ) ) { - String l_oid = ( String ) m_byName.get( a_name ) ; - m_monitor.oidResolved( a_name, l_oid ) ; - return l_oid ; + String oid = ( String ) byName.get( name ); + monitor.oidResolved( name, oid ); + return oid; } /* - * As a last resort we check if a_name is not normalized and if the + * As a last resort we check if name is not normalized and if the * normalized version used as a key returns an OID. If the normalized * name works add the normalized name as a key with its OID to the * byName lookup. BTW these normalized versions of the key are not * returned on a getNameSet. */ - String l_lowerCase = a_name.trim().toLowerCase() ; - if ( ! a_name.equals( l_lowerCase ) - && m_byName.containsKey( l_lowerCase ) ) + String lowerCase = name.trim().toLowerCase(); + if ( ! name.equals( lowerCase ) + && byName.containsKey( lowerCase ) ) { - String l_oid = ( String ) m_byName.get( l_lowerCase ) ; - m_monitor.oidResolved( a_name, l_lowerCase, l_oid ) ; + String oid = ( String ) byName.get( lowerCase ); + monitor.oidResolved( name, lowerCase, oid ); // We expect to see this version of the key again so we add it - m_byName.put( a_name, l_oid ) ; - return l_oid ; + byName.put( name, oid ); + return oid; } - NamingException l_fault = new NamingException ( "OID for name '" - + a_name + "' was not " + "found within the OID registry" ) ; - m_monitor.oidResolutionFailed( a_name, l_fault ) ; - throw l_fault ; + NamingException fault = new NamingException ( "OID for name '" + + name + "' was not " + "found within the OID registry" ); + monitor.oidResolutionFailed( name, fault ); + throw fault; } /** - * @see org.apache.ldap.server.schema.OidRegistry#getPrimaryName(java.lang.String) + * @see org.apache.eve.schema.OidRegistry#getPrimaryName(java.lang.String) */ - public String getPrimaryName( String a_oid ) throws NamingException + public String getPrimaryName( String oid ) throws NamingException { - Object l_value = m_byOid.get( a_oid ) ; + Object value = byOid.get( oid ); - if ( null == l_value ) + if ( null == value ) { - NamingException l_fault = new NamingException ( "OID '" + a_oid - + "' was not found within the OID registry" ) ; - m_monitor.oidDoesNotExist( a_oid, l_fault ) ; - throw l_fault ; + NamingException fault = new NamingException ( "OID '" + oid + + "' was not found within the OID registry" ); + monitor.oidDoesNotExist( oid, fault ); + throw fault; } - if ( l_value instanceof String ) + if ( value instanceof String ) { - m_monitor.nameResolved( a_oid, ( String ) l_value ) ; - return ( String ) l_value ; + monitor.nameResolved( oid, ( String ) value ); + return ( String ) value; } - String l_name = ( String ) ( ( List ) l_value ).get( 0 ) ; - m_monitor.nameResolved( a_oid, l_name ) ; - return l_name ; + String name = ( String ) ( ( List ) value ).get( 0 ); + monitor.nameResolved( oid, name ); + return name; } /** - * @see org.apache.ldap.server.schema.OidRegistry#getNameSet(java.lang.String) + * @see org.apache.eve.schema.OidRegistry#getNameSet(java.lang.String) */ - public List getNameSet( String a_oid ) throws NamingException + public List getNameSet( String oid ) throws NamingException { - Object l_value = m_byOid.get( a_oid ) ; + Object value = byOid.get( oid ); - if ( null == l_value ) + if ( null == value ) { - NamingException l_fault = new NamingException ( "OID '" + a_oid - + "' was not found within the OID registry" ) ; - m_monitor.oidDoesNotExist( a_oid, l_fault ) ; - throw l_fault ; + NamingException fault = new NamingException ( "OID '" + oid + + "' was not found within the OID registry" ); + monitor.oidDoesNotExist( oid, fault ); + throw fault; } - if ( l_value instanceof String ) + if ( value instanceof String ) { - List l_list = Collections.singletonList( l_value ) ; - m_monitor.namesResolved( a_oid, l_list ) ; - return l_list ; + List list = Collections.singletonList( value ); + monitor.namesResolved( oid, list ); + return list; } - m_monitor.namesResolved( a_oid, ( List ) l_value ) ; - return ( List ) l_value ; + monitor.namesResolved( oid, ( List ) value ); + return ( List ) value; } /** - * @see org.apache.ldap.server.schema.OidRegistry#list() + * @see org.apache.eve.schema.OidRegistry#list() */ public Iterator list() { - return Collections.unmodifiableSet( m_byOid.keySet() ).iterator() ; + return Collections.unmodifiableSet( byOid.keySet() ).iterator(); } /** - * @see org.apache.ldap.server.schema.OidRegistry#add(java.lang.String, - * java.lang.String) + * @see org.apache.eve.schema.OidRegistry#register(String, String) */ - public void register( String a_name, String a_oid ) + public void register( String name, String oid ) { /* * Add the entry for the given name as is and its lowercased version if * the lower cased name is different from the given name name. */ - String l_lowerCase = a_name.toLowerCase() ; - if ( ! l_lowerCase.equals( a_name ) ) + String lowerCase = name.toLowerCase(); + if ( ! lowerCase.equals( name ) ) { - m_byName.put( l_lowerCase, a_oid ) ; + byName.put( lowerCase, oid ); } // Put both the name and the oid as names - m_byName.put( a_name, a_oid ) ; - m_byName.put( a_oid, a_oid ) ; + byName.put( name, oid ); + byName.put( oid, oid ); /* * Update OID Map @@ -219,50 +185,49 @@ * Add new value to the list * 2). If we do not have a value then we just add it as a String */ - Object l_value = null ; - if ( ! m_byOid.containsKey( a_oid ) ) + Object value = null; + if ( ! byOid.containsKey( oid ) ) { - l_value = a_name ; + value = name; } else { - ArrayList l_list = null ; - l_value = m_byOid.get( a_oid ) ; + ArrayList list = null; + value = byOid.get( oid ); - if ( l_value instanceof String ) + if ( value instanceof String ) { - String l_existingName = ( String ) l_value ; + String existingName = ( String ) value; // if the existing name is already there we don't readd it - if ( l_existingName.equalsIgnoreCase( a_name ) ) + if ( existingName.equalsIgnoreCase( name ) ) { - return ; + return; } - l_list = new ArrayList() ; - l_list.add( l_value ) ; - l_value = l_list ; + list = new ArrayList(); + list.add( value ); + value = list; } - else if ( l_value instanceof ArrayList ) + else if ( value instanceof ArrayList ) { - l_list = ( ArrayList ) l_list ; + list = ( ArrayList ) value; - for ( int ii = 0; ii < l_list.size(); ii++ ) + for ( int ii = 0; ii < list.size(); ii++ ) { // One form or another of the name already exists in list - if ( ! a_name.equalsIgnoreCase( ( String ) - l_list.get( ii ) ) ) + if ( ! name.equalsIgnoreCase( ( String ) list.get( ii ) ) ) { - return ; + return; } } - l_list.add( a_name ) ; + list.add( name ); } } - m_byOid.put( a_oid, l_value ) ; - m_monitor.registered( a_name, a_oid ) ; + byOid.put( oid, value ); + monitor.registered( name, oid ); } @@ -273,18 +238,18 @@ */ OidRegistryMonitor getMonitor() { - return m_monitor ; + return monitor; } /** * Sets the monitor. * - * @param a_monitor monitor to set. + * @param monitor monitor to set. */ - void setMonitor( OidRegistryMonitor a_monitor ) + void setMonitor( OidRegistryMonitor monitor ) { - m_monitor = a_monitor ; + this.monitor = monitor; } } Modified: incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultSyntaxRegistry.java ============================================================================== --- incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultSyntaxRegistry.java (original) +++ incubator/directory/eve/trunk/backend/impl/src/java/org/apache/eve/schema/DefaultSyntaxRegistry.java Mon Sep 27 20:10:12 2004 @@ -1,78 +1,46 @@ /* + * 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.eve.schema; - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact [EMAIL PROTECTED] - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation. For more information on the - Apache Software Foundation, please see <http://www.apache.org/>. - -*/ -package org.apache.eve.schema ; +import org.apache.ldap.common.schema.Syntax; -import java.util.Map ; -import java.util.HashMap ; +import java.util.Map; +import java.util.HashMap; -import javax.naming.NamingException ; -import javax.naming.OperationNotSupportedException ; +import javax.naming.NamingException; +import javax.naming.OperationNotSupportedException; /** * A SyntaxRegistry service available during server startup when other resources * like a syntax backing store is unavailable. * - * @author <a href="mailto:[EMAIL PROTECTED]">Alex Karasulu</a> - * @author $Author$ + * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a> * @version $Rev$ */ -public class BootstrapSyntaxRegistry implements SyntaxRegistry +public class DefaultSyntaxRegistry implements SyntaxRegistry { /** a map of entries using an OID for the key and a Syntax for the value */ - private final Map m_syntaxes ; + private final Map syntaxes; /** the OID registry this registry uses to register new syntax OIDs */ - private final OidRegistry m_registry ; + private final OidRegistry registry; /** a monitor used to track noteable registry events */ - private SyntaxRegistryMonitor m_monitor = null ; + private SyntaxRegistryMonitor monitor = null; // ------------------------------------------------------------------------ @@ -81,43 +49,42 @@ /** - * Creates a BootstrapSyntaxRegistry using existing Syntaxes for lookups. + * Creates a DefaultSyntaxRegistry using existing Syntaxes for lookups. * - * @param a_syntaxes a map of OIDs to their respective Syntax objects + * @param syntaxes a map of OIDs to their respective Syntax objects */ - public BootstrapSyntaxRegistry( Syntax[] a_syntaxes, - OidRegistry a_registry ) + public DefaultSyntaxRegistry( Syntax[] syntaxes, OidRegistry registry ) { - this ( a_syntaxes, a_registry, new SyntaxRegistryMonitorAdapter() ) ; + this ( syntaxes, registry, new SyntaxRegistryMonitorAdapter() ); } /** - * Creates a BootstrapSyntaxRegistry using existing Syntaxes for lookups. + * Creates a DefaultSyntaxRegistry using existing Syntaxes for lookups. * - * @param a_syntaxes a map of OIDs to their respective Syntax objects + * @param syntaxes a map of OIDs to their respective Syntax objects */ - public BootstrapSyntaxRegistry( Syntax[] a_syntaxes, - OidRegistry a_registry, - SyntaxRegistryMonitor a_monitor ) - { - m_monitor = a_monitor ; - m_registry = a_registry ; - m_syntaxes = new HashMap() ; + public DefaultSyntaxRegistry( Syntax[] syntaxes, + OidRegistry registry, + SyntaxRegistryMonitor monitor ) + { + this.monitor = monitor; + this.registry = registry; + this.syntaxes = new HashMap(); - for ( int ii = 0; ii < a_syntaxes.length; ii++ ) + for ( int ii = 0; ii < syntaxes.length; ii++ ) { - m_syntaxes.put( a_syntaxes[ii].getOid(), a_syntaxes[ii] ) ; + this.syntaxes.put( syntaxes[ii].getOid(), syntaxes[ii] ); - m_registry.register( a_syntaxes[ii].getOid(), - a_syntaxes[ii].getOid() ) ; - if ( a_syntaxes[ii].getName() != null ) + registry.register( syntaxes[ii].getOid(), + syntaxes[ii].getOid() ); + if ( syntaxes[ii].getName() != null ) { - m_registry.register( a_syntaxes[ii].getName(), - a_syntaxes[ii].getOid() ) ; + registry.register( syntaxes[ii].getName(), + syntaxes[ii].getOid() ); } - m_monitor.registered( a_syntaxes[ii] ) ; + monitor.registered( syntaxes[ii] ); } } @@ -130,42 +97,41 @@ /** * @see org.apache.eve.schema.SyntaxRegistry#lookup(java.lang.String) */ - public Syntax lookup( String a_oid ) throws NamingException + public Syntax lookup( String oid ) throws NamingException { - if ( m_syntaxes.containsKey( a_oid ) ) + if ( syntaxes.containsKey( oid ) ) { - Syntax l_syntax = ( Syntax ) m_syntaxes.get( a_oid ) ; - m_monitor.lookedUp( l_syntax ) ; - return l_syntax ; + Syntax syntax = ( Syntax ) syntaxes.get( oid ); + monitor.lookedUp( syntax ); + return syntax; } - NamingException l_fault = new NamingException( "Unknown syntax OID " - + a_oid ) ; - m_monitor.lookupFailed( a_oid, l_fault ) ; - throw l_fault ; + NamingException fault = new NamingException( "Unknown syntax OID " + + oid ); + monitor.lookupFailed( oid, fault ); + throw fault; } /** - * @see org.apache.eve.schema.SyntaxRegistry#register( - * org.apache.eve.schema.Syntax) + * @see org.apache.eve.schema.SyntaxRegistry#register(Syntax) */ - public void register( Syntax a_syntax ) throws NamingException + public void register( Syntax syntax ) throws NamingException { - NamingException l_fault = new OperationNotSupportedException( + NamingException fault = new OperationNotSupportedException( "Syntax registration on read-only bootstrap SyntaxRegistry not " - + "supported." ) ; - m_monitor.registerFailed( a_syntax, l_fault ) ; - throw l_fault ; + + "supported." ); + monitor.registerFailed( syntax, fault ); + throw fault; } /** * @see org.apache.eve.schema.SyntaxRegistry#hasSyntax(java.lang.String) */ - public boolean hasSyntax( String a_oid ) + public boolean hasSyntax( String oid ) { - return m_syntaxes.containsKey( a_oid ) ; + return syntaxes.containsKey( oid ); } @@ -181,17 +147,17 @@ */ SyntaxRegistryMonitor getMonitor() { - return m_monitor ; + return monitor; } /** * Sets the monitor for this registry. * - * @param a_monitor the monitor to set + * @param monitor the monitor to set */ - void setMonitor( SyntaxRegistryMonitor a_monitor ) + void setMonitor( SyntaxRegistryMonitor monitor ) { - m_monitor = a_monitor ; + this.monitor = monitor; } }
