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/20 04:36:53 UTC
svn commit: r379008 [8/11] - in /directory/trunks/shared: ./ asn1/
asn1/src/main/java/org/apache/directory/shared/asn1/
asn1/src/main/java/org/apache/directory/shared/asn1/ber/
asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/
asn1/src/m...
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnParser.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnParser.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnParser.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnParser.java Sun Feb 19 19:35:07 2006
@@ -1,252 +1,252 @@
-/*
- * 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.shared.ldap.name;
-
-
-import java.io.IOException;
-import java.io.StringReader;
-
-import javax.naming.Name;
-import javax.naming.NameParser;
-import javax.naming.NamingException;
-
-import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.util.ExceptionUtils;
-import org.apache.directory.shared.ldap.util.NestableRuntimeException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import antlr.TokenStreamSelector;
-import antlr.RecognitionException;
-import antlr.TokenStreamException;
-
-
-/**
- * A distinguished name parser which generates JNDI Ldap exception on error.
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2253.html">RFC 2253</a>
- * @see <a href="http://www.faqs.org/rfcs/rfc1779.html">RFC 1779</a>
- */
-public class DnParser implements NameParser
-{
- private static final Logger log = LoggerFactory.getLogger( DnParser.class );
-
- private TokenStreamSelector m_selector;
-
- private final boolean m_isNormalizing;
-
- private ReusableAntlrNameParser m_parser;
-
- private ReusableAntlrTypeLexer typeLexer;
-
- private ReusableAntlrValueLexer valueLexer;
-
- private static final Object parserMutex = new Object();
-
-
- /**
- * Creates a regular non normalizing name parser.
- *
- * @throws LdapNamingException
- * if there is a problem creating the pipe
- */
- public DnParser() throws NamingException
- {
- this.m_isNormalizing = false;
-
- try
- {
- init();
- }
- catch ( IOException e )
- {
- String msg = "failed while initializing a name parser:\n";
- msg += ExceptionUtils.getStackTrace( e );
- LdapNamingException ne = new LdapNamingException( msg, ResultCodeEnum.OTHER );
- ne.setRootCause( e );
- throw ne;
- }
- }
-
-
- /**
- * Creates a normalizing name parser.
- *
- * @param a_normalizer
- * the name component value normaliser used
- * @throws LdapNamingException
- * if there is a problem creating the pipe
- */
- public DnParser(NameComponentNormalizer a_normalizer) throws NamingException
- {
- try
- {
- init();
- }
- catch ( IOException e )
- {
- String msg = "failed while initializing a name parser:\n";
- msg += ExceptionUtils.getStackTrace( e );
- LdapNamingException ne = new LdapNamingException( msg, ResultCodeEnum.OTHER );
- ne.setRootCause( e );
- throw ne;
- }
-
- synchronized ( parserMutex )
- {
- this.m_isNormalizing = true;
- this.m_parser.setNormalizer( a_normalizer );
- }
- }
-
-
- /**
- * Tests to see if this parser is normalizing.
- *
- * @return true if it normalizes false otherwise
- */
- public boolean isNormizing()
- {
- return this.m_isNormalizing;
- }
-
-
- /**
- * Initializes the parser machinery and the pluming.
- *
- * @throws IOException
- * if there is a problem creating the parser's pipe
- */
- private void init() throws IOException
- {
- synchronized ( parserMutex )
- {
- this.m_selector = new TokenStreamSelector();
-
- // Create lexers and add them to the selector.
- typeLexer = new ReusableAntlrTypeLexer( new StringReader( "" ) );
- this.m_selector.addInputStream( typeLexer, ReusableAntlrTypeLexer.LEXER_KEY );
- valueLexer = new ReusableAntlrValueLexer( typeLexer.getInputState() );
- this.m_selector.addInputStream( valueLexer, ReusableAntlrValueLexer.LEXER_KEY );
-
- // Set selector on lexers, select initial lexer and initalize parser
- typeLexer.setSelector( this.m_selector );
- valueLexer.setSelector( this.m_selector );
- this.m_selector.select( ReusableAntlrTypeLexer.LEXER_KEY );
- this.m_parser = new ReusableAntlrNameParser( m_selector );
- }
- }
-
-
- /**
- * Resets the parser and lexers to be reused with new input
- */
- private void reset( String name )
- {
- this.typeLexer.prepareNextInput( new StringReader( name + "#\n" ) );
- this.valueLexer.prepareNextInput( typeLexer.getInputState() );
- this.m_parser.resetState();
- }
-
-
- /**
- * Parses a name as a String into an existing Name object.
- *
- * @param name
- * the distinguished name as a string.
- * @param emptyName
- * the empty LdapName to be populated or null.
- * @return the populated LdapName
- * @throws NamingException
- * if a_name is invalid or the parsers plumbing breaks
- */
- public Name parse( String name, LdapName emptyName ) throws NamingException
- {
- if ( log.isDebugEnabled() )
- {
- log.debug( "Parsing DN '" + name + "'" );
- }
-
- // Handle the empty name basis case.
- if ( name == null || name.trim().equals( "" ) )
- {
- return null == emptyName ? new LdapName() : emptyName;
- }
-
- try
- {
- if ( null == emptyName )
- {
- synchronized ( parserMutex )
- {
- reset( name );
- emptyName = new LdapName( m_parser.name() );
- }
- }
- else
- {
- synchronized ( parserMutex )
- {
- reset( name );
- emptyName.setList( m_parser.name() );
- }
- }
- }
- catch ( RecognitionException e )
- {
- String msg = "Parser failure on name:\n\t" + name;
- msg += "\nAntlr exception trace:\n" + ExceptionUtils.getFullStackTrace( e );
-
- throw new LdapInvalidNameException( msg, ResultCodeEnum.INVALIDDNSYNTAX );
- }
- catch ( TokenStreamException e2 )
- {
- String msg = "Parser failure on name:\n\t" + name;
- msg += "\nAntlr exception trace:\n" + ExceptionUtils.getFullStackTrace( e2 );
- throw new LdapInvalidNameException( msg, ResultCodeEnum.INVALIDDNSYNTAX );
- }
- catch ( NestableRuntimeException e )
- {
- Throwable throwable = e.getCause();
- if ( throwable instanceof NamingException )
- {
- NamingException ne = ( NamingException ) throwable;
- throw ne;
- }
- else
- {
- throw e;
- }
- }
-
- return emptyName;
- }
-
-
- /**
- * Parses a name as a String into a Name object.
- *
- * @see javax.naming.NameParser#parse(java.lang.String)
- */
- public Name parse( String name ) throws NamingException
- {
- return parse( name, new LdapName() );
- }
-}
+/*
+ * 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.shared.ldap.name;
+
+
+import java.io.IOException;
+import java.io.StringReader;
+
+import javax.naming.Name;
+import javax.naming.NameParser;
+import javax.naming.NamingException;
+
+import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
+import org.apache.directory.shared.ldap.exception.LdapNamingException;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.util.ExceptionUtils;
+import org.apache.directory.shared.ldap.util.NestableRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import antlr.TokenStreamSelector;
+import antlr.RecognitionException;
+import antlr.TokenStreamException;
+
+
+/**
+ * A distinguished name parser which generates JNDI Ldap exception on error.
+ *
+ * @see <a href="http://www.faqs.org/rfcs/rfc2253.html">RFC 2253</a>
+ * @see <a href="http://www.faqs.org/rfcs/rfc1779.html">RFC 1779</a>
+ */
+public class DnParser implements NameParser
+{
+ private static final Logger log = LoggerFactory.getLogger( DnParser.class );
+
+ private TokenStreamSelector m_selector;
+
+ private final boolean m_isNormalizing;
+
+ private ReusableAntlrNameParser m_parser;
+
+ private ReusableAntlrTypeLexer typeLexer;
+
+ private ReusableAntlrValueLexer valueLexer;
+
+ private static final Object parserMutex = new Object();
+
+
+ /**
+ * Creates a regular non normalizing name parser.
+ *
+ * @throws LdapNamingException
+ * if there is a problem creating the pipe
+ */
+ public DnParser() throws NamingException
+ {
+ this.m_isNormalizing = false;
+
+ try
+ {
+ init();
+ }
+ catch ( IOException e )
+ {
+ String msg = "failed while initializing a name parser:\n";
+ msg += ExceptionUtils.getStackTrace( e );
+ LdapNamingException ne = new LdapNamingException( msg, ResultCodeEnum.OTHER );
+ ne.setRootCause( e );
+ throw ne;
+ }
+ }
+
+
+ /**
+ * Creates a normalizing name parser.
+ *
+ * @param a_normalizer
+ * the name component value normaliser used
+ * @throws LdapNamingException
+ * if there is a problem creating the pipe
+ */
+ public DnParser(NameComponentNormalizer a_normalizer) throws NamingException
+ {
+ try
+ {
+ init();
+ }
+ catch ( IOException e )
+ {
+ String msg = "failed while initializing a name parser:\n";
+ msg += ExceptionUtils.getStackTrace( e );
+ LdapNamingException ne = new LdapNamingException( msg, ResultCodeEnum.OTHER );
+ ne.setRootCause( e );
+ throw ne;
+ }
+
+ synchronized ( parserMutex )
+ {
+ this.m_isNormalizing = true;
+ this.m_parser.setNormalizer( a_normalizer );
+ }
+ }
+
+
+ /**
+ * Tests to see if this parser is normalizing.
+ *
+ * @return true if it normalizes false otherwise
+ */
+ public boolean isNormizing()
+ {
+ return this.m_isNormalizing;
+ }
+
+
+ /**
+ * Initializes the parser machinery and the pluming.
+ *
+ * @throws IOException
+ * if there is a problem creating the parser's pipe
+ */
+ private void init() throws IOException
+ {
+ synchronized ( parserMutex )
+ {
+ this.m_selector = new TokenStreamSelector();
+
+ // Create lexers and add them to the selector.
+ typeLexer = new ReusableAntlrTypeLexer( new StringReader( "" ) );
+ this.m_selector.addInputStream( typeLexer, ReusableAntlrTypeLexer.LEXER_KEY );
+ valueLexer = new ReusableAntlrValueLexer( typeLexer.getInputState() );
+ this.m_selector.addInputStream( valueLexer, ReusableAntlrValueLexer.LEXER_KEY );
+
+ // Set selector on lexers, select initial lexer and initalize parser
+ typeLexer.setSelector( this.m_selector );
+ valueLexer.setSelector( this.m_selector );
+ this.m_selector.select( ReusableAntlrTypeLexer.LEXER_KEY );
+ this.m_parser = new ReusableAntlrNameParser( m_selector );
+ }
+ }
+
+
+ /**
+ * Resets the parser and lexers to be reused with new input
+ */
+ private void reset( String name )
+ {
+ this.typeLexer.prepareNextInput( new StringReader( name + "#\n" ) );
+ this.valueLexer.prepareNextInput( typeLexer.getInputState() );
+ this.m_parser.resetState();
+ }
+
+
+ /**
+ * Parses a name as a String into an existing Name object.
+ *
+ * @param name
+ * the distinguished name as a string.
+ * @param emptyName
+ * the empty LdapName to be populated or null.
+ * @return the populated LdapName
+ * @throws NamingException
+ * if a_name is invalid or the parsers plumbing breaks
+ */
+ public Name parse( String name, LdapName emptyName ) throws NamingException
+ {
+ if ( log.isDebugEnabled() )
+ {
+ log.debug( "Parsing DN '" + name + "'" );
+ }
+
+ // Handle the empty name basis case.
+ if ( name == null || name.trim().equals( "" ) )
+ {
+ return null == emptyName ? new LdapName() : emptyName;
+ }
+
+ try
+ {
+ if ( null == emptyName )
+ {
+ synchronized ( parserMutex )
+ {
+ reset( name );
+ emptyName = new LdapName( m_parser.name() );
+ }
+ }
+ else
+ {
+ synchronized ( parserMutex )
+ {
+ reset( name );
+ emptyName.setList( m_parser.name() );
+ }
+ }
+ }
+ catch ( RecognitionException e )
+ {
+ String msg = "Parser failure on name:\n\t" + name;
+ msg += "\nAntlr exception trace:\n" + ExceptionUtils.getFullStackTrace( e );
+
+ throw new LdapInvalidNameException( msg, ResultCodeEnum.INVALIDDNSYNTAX );
+ }
+ catch ( TokenStreamException e2 )
+ {
+ String msg = "Parser failure on name:\n\t" + name;
+ msg += "\nAntlr exception trace:\n" + ExceptionUtils.getFullStackTrace( e2 );
+ throw new LdapInvalidNameException( msg, ResultCodeEnum.INVALIDDNSYNTAX );
+ }
+ catch ( NestableRuntimeException e )
+ {
+ Throwable throwable = e.getCause();
+ if ( throwable instanceof NamingException )
+ {
+ NamingException ne = ( NamingException ) throwable;
+ throw ne;
+ }
+ else
+ {
+ throw e;
+ }
+ }
+
+ return emptyName;
+ }
+
+
+ /**
+ * Parses a name as a String into a Name object.
+ *
+ * @see javax.naming.NameParser#parse(java.lang.String)
+ */
+ public Name parse( String name ) throws NamingException
+ {
+ return parse( name, new LdapName() );
+ }
+}
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/DnParser.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java Sun Feb 19 19:35:07 2006
@@ -34,6 +34,7 @@
import org.apache.directory.shared.ldap.codec.util.LdapStringEncodingException;
import org.apache.directory.shared.ldap.name.Rdn;
import org.apache.directory.shared.ldap.schema.OidNormalizer;
+import org.apache.directory.shared.ldap.util.DNUtils;
import org.apache.directory.shared.ldap.util.StringTools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -1093,6 +1094,11 @@
{
String type = StringTools.trim( atav.getType() );
+ if ( ( type.startsWith( "oid." ) ) || ( type.startsWith( "OID." ) ) )
+ {
+ type = type.substring( 4 );
+ }
+
if ( StringTools.isNotEmpty( StringTools.lowerCase( type ) ) )
{
OidNormalizer oidNormalizer = ( OidNormalizer ) oids.get( type );
@@ -1153,6 +1159,11 @@
else
{
String type = StringTools.trim( rdn.getType() );
+
+ if ( ( type.startsWith( "oid." ) ) || ( type.startsWith( "OID." ) ) )
+ {
+ type = type.substring( 4 );
+ }
if ( StringTools.isNotEmpty( StringTools.lowerCase( type ) ) )
{
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java Sun Feb 19 19:35:07 2006
@@ -126,7 +126,14 @@
&& ( StringTools.isCharASCII( chars, pos, ';' ) == false ) )
{
- break;
+ if ( pos != chars.length )
+ {
+ throw new InvalidNameException( "Bad DN : " + new String( chars ) );
+ }
+ else
+ {
+ break;
+ }
}
chars[pos] = ',';
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapName.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapName.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapName.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapName.java Sun Feb 19 19:35:07 2006
@@ -16,7 +16,7 @@
*/
/*
- * $Id: LdapName.java,v 1.11 2003/09/23 07:13:26 akarasulu Exp $
+ * $Id$
* $Prologue$
*
* -- (c) LDAPd Group --
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapName.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapName.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/NameComponentNormalizer.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/NameComponentNormalizer.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/NameComponentNormalizer.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/NameComponentNormalizer.java Sun Feb 19 19:35:07 2006
@@ -1,108 +1,108 @@
-/*
- * 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.
- *
- */
-
-/*
- * $Id: NameComponentNormalizer.java,v 1.3 2003/07/31 21:44:49 akarasulu Exp $
- *
- * -- (c) LDAPd Group --
- * -- Please refer to the LICENSE.txt file in the root directory of --
- * -- any LDAPd project for copyright and distribution information. --
- *
- */
-
-package org.apache.directory.shared.ldap.name;
-
-
-import javax.naming.NamingException;
-
-
-/**
- * Normalizers of ldap name component attributes and their values.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author: akarasulu $
- * @version $Revision$
- */
-public interface NameComponentNormalizer
-{
- /**
- * Checks to see if an attribute name/oid is defined.
- *
- * @param id
- * the name/oid of the attribute to see if it is defined
- * @return true if it is, false otherwise
- */
- boolean isDefined( String id );
-
-
- /**
- * Normalizes an attribute's value given the name of the attribute - short
- * names like 'cn' as well as 'commonName' should work here.
- *
- * @param attributeName
- * the name of the attribute
- * @param value
- * the value of the attribute to normalize
- * @return the normalized value
- * @throws NamingException
- * if there is a recognition problem or a syntax issue
- */
- String normalizeByName( String attributeName, String value ) throws NamingException;
-
-
- /**
- * Normalizes an attribute's value given the name of the attribute - short
- * names like 'cn' as well as 'commonName' should work here.
- *
- * @param attributeName
- * the name of the attribute
- * @param value
- * the value of the attribute to normalize
- * @return the normalized value
- * @throws NamingException
- * if there is a recognition problem or a syntax issue
- */
- String normalizeByName( String attributeName, byte[] value ) throws NamingException;
-
-
- /**
- * Normalizes an attribute's value given the OID of the attribute.
- *
- * @param attributeOid
- * the OID of the attribute
- * @param value
- * the value of the attribute to normalize
- * @return the normalized value
- * @throws NamingException
- * if there is a recognition problem or a syntax issue
- */
- String normalizeByOid( String attributeOid, String value ) throws NamingException;
-
-
- /**
- * Normalizes an attribute's value given the OID of the attribute.
- *
- * @param attributeOid
- * the OID of the attribute
- * @param value
- * the value of the attribute to normalize
- * @return the normalized value
- * @throws NamingException
- * if there is a recognition problem or a syntax issue
- */
- String normalizeByOid( String attributeOid, byte[] value ) throws NamingException;
-}
+/*
+ * 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.
+ *
+ */
+
+/*
+ * $Id$
+ *
+ * -- (c) LDAPd Group --
+ * -- Please refer to the LICENSE.txt file in the root directory of --
+ * -- any LDAPd project for copyright and distribution information. --
+ *
+ */
+
+package org.apache.directory.shared.ldap.name;
+
+
+import javax.naming.NamingException;
+
+
+/**
+ * Normalizers of ldap name component attributes and their values.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author: akarasulu $
+ * @version $Revision$
+ */
+public interface NameComponentNormalizer
+{
+ /**
+ * Checks to see if an attribute name/oid is defined.
+ *
+ * @param id
+ * the name/oid of the attribute to see if it is defined
+ * @return true if it is, false otherwise
+ */
+ boolean isDefined( String id );
+
+
+ /**
+ * Normalizes an attribute's value given the name of the attribute - short
+ * names like 'cn' as well as 'commonName' should work here.
+ *
+ * @param attributeName
+ * the name of the attribute
+ * @param value
+ * the value of the attribute to normalize
+ * @return the normalized value
+ * @throws NamingException
+ * if there is a recognition problem or a syntax issue
+ */
+ String normalizeByName( String attributeName, String value ) throws NamingException;
+
+
+ /**
+ * Normalizes an attribute's value given the name of the attribute - short
+ * names like 'cn' as well as 'commonName' should work here.
+ *
+ * @param attributeName
+ * the name of the attribute
+ * @param value
+ * the value of the attribute to normalize
+ * @return the normalized value
+ * @throws NamingException
+ * if there is a recognition problem or a syntax issue
+ */
+ String normalizeByName( String attributeName, byte[] value ) throws NamingException;
+
+
+ /**
+ * Normalizes an attribute's value given the OID of the attribute.
+ *
+ * @param attributeOid
+ * the OID of the attribute
+ * @param value
+ * the value of the attribute to normalize
+ * @return the normalized value
+ * @throws NamingException
+ * if there is a recognition problem or a syntax issue
+ */
+ String normalizeByOid( String attributeOid, String value ) throws NamingException;
+
+
+ /**
+ * Normalizes an attribute's value given the OID of the attribute.
+ *
+ * @param attributeOid
+ * the OID of the attribute
+ * @param value
+ * the value of the attribute to normalize
+ * @return the normalized value
+ * @throws NamingException
+ * if there is a recognition problem or a syntax issue
+ */
+ String normalizeByOid( String attributeOid, byte[] value ) throws NamingException;
+}
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/NameComponentNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/NameComponentNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrNameParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrNameParser.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrTypeLexer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrTypeLexer.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrValueLexer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrValueLexer.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/SimpleNameComponentNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/SimpleNameComponentNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractAttributeType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractAttributeType.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractMatchingRule.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractMatchingRule.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSyntax.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSyntax.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AcceptAllSyntaxChecker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AcceptAllSyntaxChecker.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/BinarySyntaxChecker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/BinarySyntaxChecker.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/CachingNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/CachingNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ComparableComparator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ComparableComparator.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimToLowerNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimToLowerNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DefaultObjectClass.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DescriptionUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DescriptionUtils.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DnComparator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DnComparator.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DnNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DnNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DnSyntaxChecker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DnSyntaxChecker.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapDnNormalizer.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapDnNormalizer.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapDnNormalizer.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapDnNormalizer.java Sun Feb 19 19:35:07 2006
@@ -30,7 +30,7 @@
* A distinguished name normalizer that works with a schema or without.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev: 359114 $
+ * @version $Rev$
*/
public class LdapDnNormalizer implements Normalizer
{
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapDnNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapDnNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleEnum.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleEnum.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NoOpNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NoOpNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/Normalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/Normalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NormalizingComparator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NormalizingComparator.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClassTypeEnum.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClassTypeEnum.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectIdentifierComparator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectIdentifierNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/OidNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/OidNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/RegexNormalizer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/RegexNormalizer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/RegexSyntaxChecker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/RegexSyntaxChecker.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/Syntax.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/Syntax.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SyntaxChecker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SyntaxChecker.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/UsageEnum.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/ReusableAntlrSubtreeSpecificationLexer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/ReusableAntlrSubtreeSpecificationLexer.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/ReusableAntlrSubtreeSpecificationParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/ReusableAntlrSubtreeSpecificationParser.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecification.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecification.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationModifier.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationModifier.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParser.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrl.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrl.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrl.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrl.java Sun Feb 19 19:35:07 2006
@@ -1,116 +1,116 @@
-/*
- * 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.
- *
- */
-
-/*
- * $Id: LdapUrl.java,v 1.2 2003/07/27 03:07:02 akarasulu Exp $
- *
- * -- (c) LDAPd Group --
- * -- Please refer to the LICENSE.txt file in the root directory of --
- * -- any LDAPd project for copyright and distribution information. --
- *
- */
-
-package org.apache.directory.shared.ldap.url;
-
-
-import java.util.List;
-
-import javax.naming.Name;
-
-import org.apache.directory.shared.ldap.filter.ExprNode;
-
-
-/**
- * A parsed LDAP URL.
- *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author: akarasulu $
- * @version $Revision$
- */
-public interface LdapUrl
-{
- /**
- * Gets the distinguished name of this LdapUrl.
- *
- * @return the non-normalized Dn
- */
- Name getName();
-
-
- /**
- * Gets the hostname component of this LdapUrl.
- *
- * @return the hostname of the server.
- */
- String getHostName();
-
-
- /**
- * Gets the port component of this LdapUrl.
- *
- * @return the port number component of the LdapUrl.
- */
- int getPort();
-
-
- /**
- * Gets the filter component of this LdapUrl as a filter expression tree.
- *
- * @return the filter expression tree's root node.
- */
- ExprNode getFilter();
-
-
- /**
- * Gets the attributes component of this LdapUrl.
- *
- * @return a List containing the attribute names as Strings to return in the
- * search results if this LdapUrl represents a search. If attributes
- * are not specified the list will be empty.
- */
- List getAttributes();
-
-
- /**
- * Gets the extensions component of this LdapUrl. TODO can't say I know what
- * this is at the moment
- *
- * @return a List containing the extensions
- */
- List getExtensions();
-
-
- /**
- * Gets the scope of the search if this LdapUrl represents a search URL. The
- * values returned are defined within the JNDI SearchControls class.
- *
- * @see javax.naming.directory.SearchControls#OBJECT_SCOPE
- * @see javax.naming.directory.SearchControls#ONELEVEL_SCOPE
- * @see javax.naming.directory.SearchControls#SUBTREE_SCOPE
- * @return the scope of the search.
- */
- int getScope();
-
-
- /**
- * Gets whether or not secure ldaps scheme with SSL is used or normal ldap
- * scheme is used.
- *
- * @return true if ldaps is the scheme, false if it is ldap
- */
- boolean isSecure();
-}
+/*
+ * 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.
+ *
+ */
+
+/*
+ * $Id$
+ *
+ * -- (c) LDAPd Group --
+ * -- Please refer to the LICENSE.txt file in the root directory of --
+ * -- any LDAPd project for copyright and distribution information. --
+ *
+ */
+
+package org.apache.directory.shared.ldap.url;
+
+
+import java.util.List;
+
+import javax.naming.Name;
+
+import org.apache.directory.shared.ldap.filter.ExprNode;
+
+
+/**
+ * A parsed LDAP URL.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author: akarasulu $
+ * @version $Revision$
+ */
+public interface LdapUrl
+{
+ /**
+ * Gets the distinguished name of this LdapUrl.
+ *
+ * @return the non-normalized Dn
+ */
+ Name getName();
+
+
+ /**
+ * Gets the hostname component of this LdapUrl.
+ *
+ * @return the hostname of the server.
+ */
+ String getHostName();
+
+
+ /**
+ * Gets the port component of this LdapUrl.
+ *
+ * @return the port number component of the LdapUrl.
+ */
+ int getPort();
+
+
+ /**
+ * Gets the filter component of this LdapUrl as a filter expression tree.
+ *
+ * @return the filter expression tree's root node.
+ */
+ ExprNode getFilter();
+
+
+ /**
+ * Gets the attributes component of this LdapUrl.
+ *
+ * @return a List containing the attribute names as Strings to return in the
+ * search results if this LdapUrl represents a search. If attributes
+ * are not specified the list will be empty.
+ */
+ List getAttributes();
+
+
+ /**
+ * Gets the extensions component of this LdapUrl. TODO can't say I know what
+ * this is at the moment
+ *
+ * @return a List containing the extensions
+ */
+ List getExtensions();
+
+
+ /**
+ * Gets the scope of the search if this LdapUrl represents a search URL. The
+ * values returned are defined within the JNDI SearchControls class.
+ *
+ * @see javax.naming.directory.SearchControls#OBJECT_SCOPE
+ * @see javax.naming.directory.SearchControls#ONELEVEL_SCOPE
+ * @see javax.naming.directory.SearchControls#SUBTREE_SCOPE
+ * @return the scope of the search.
+ */
+ int getScope();
+
+
+ /**
+ * Gets whether or not secure ldaps scheme with SSL is used or normal ldap
+ * scheme is used.
+ *
+ * @return true if ldaps is the scheme, false if it is ldap
+ */
+ boolean isSecure();
+}
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrl.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrlParser.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrlParser.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrlParser.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrlParser.java Sun Feb 19 19:35:07 2006
@@ -1,53 +1,53 @@
-/*
- * 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.
- *
- */
-
-/*
- * $Id: LdapUrlParser.java,v 1.1 2003/07/25 21:41:48 akarasulu Exp $
- *
- * -- (c) LDAPd Group --
- * -- Please refer to the LICENSE.txt file in the root directory of --
- * -- any LDAPd project for copyright and distribution information. --
- *
- */
-
-package org.apache.directory.shared.ldap.url;
-
-
-import javax.naming.NamingException;
-
-
-/**
- * An LDAP URL parser.
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2255.html">RFC 2255</a>
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author: akarasulu $
- * @version $Revision$
- */
-public interface LdapUrlParser
-{
- /**
- * Parses an LDAP URL.
- *
- * @param a_urlString
- * the LDAP URL as a String
- * @return a parsed instance of LdapUrl.
- * @throws NamingException
- * if the URL or any one of its components is malformed.
- */
- LdapUrl parse( String a_urlString ) throws NamingException;
-}
+/*
+ * 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.
+ *
+ */
+
+/*
+ * $Id$
+ *
+ * -- (c) LDAPd Group --
+ * -- Please refer to the LICENSE.txt file in the root directory of --
+ * -- any LDAPd project for copyright and distribution information. --
+ *
+ */
+
+package org.apache.directory.shared.ldap.url;
+
+
+import javax.naming.NamingException;
+
+
+/**
+ * An LDAP URL parser.
+ *
+ * @see <a href="http://www.faqs.org/rfcs/rfc2255.html">RFC 2255</a>
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author: akarasulu $
+ * @version $Revision$
+ */
+public interface LdapUrlParser
+{
+ /**
+ * Parses an LDAP URL.
+ *
+ * @param a_urlString
+ * the LDAP URL as a String
+ * @return a parsed instance of LdapUrl.
+ * @throws NamingException
+ * if the URL or any one of its components is malformed.
+ */
+ LdapUrl parse( String a_urlString ) throws NamingException;
+}
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrlParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/url/LdapUrlParser.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/AbstractSimpleComponentsMonitor.java
URL: http://svn.apache.org/viewcvs/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/AbstractSimpleComponentsMonitor.java?rev=379008&r1=379007&r2=379008&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/AbstractSimpleComponentsMonitor.java (original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/AbstractSimpleComponentsMonitor.java Sun Feb 19 19:35:07 2006
@@ -1,63 +1,63 @@
-/*
- * Copyright 2005 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.shared.ldap.util;
-
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-
-public abstract class AbstractSimpleComponentsMonitor implements ComponentsMonitor
-{
- private List components;
-
-
- public AbstractSimpleComponentsMonitor(String[] components)
- {
- // register components
- this.components = new LinkedList( Arrays.asList( components ) );
- }
-
-
- public ComponentsMonitor useComponent( String component ) throws IllegalArgumentException
- {
- if ( !components.remove( component ) )
- {
- throw new IllegalArgumentException( "Unregistered or previously used component: " + component );
- }
-
- return this;
- }
-
-
- public boolean allComponentsUsed()
- {
- return components.isEmpty();
- }
-
-
- public List getRemainingComponents()
- {
- return Collections.unmodifiableList( components );
- }
-
-
- public abstract boolean finalStateValid();
-}
+/*
+ * Copyright 2005 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.shared.ldap.util;
+
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+
+public abstract class AbstractSimpleComponentsMonitor implements ComponentsMonitor
+{
+ private List components;
+
+
+ public AbstractSimpleComponentsMonitor(String[] components)
+ {
+ // register components
+ this.components = new LinkedList( Arrays.asList( components ) );
+ }
+
+
+ public ComponentsMonitor useComponent( String component ) throws IllegalArgumentException
+ {
+ if ( !components.remove( component ) )
+ {
+ throw new IllegalArgumentException( "Unregistered or previously used component: " + component );
+ }
+
+ return this;
+ }
+
+
+ public boolean allComponentsUsed()
+ {
+ return components.isEmpty();
+ }
+
+
+ public List getRemainingComponents()
+ {
+ return Collections.unmodifiableList( components );
+ }
+
+
+ public abstract boolean finalStateValid();
+}
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/AbstractSimpleComponentsMonitor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/AbstractSimpleComponentsMonitor.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/ArrayEnumeration.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/ArrayEnumeration.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/ArrayUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/ArrayUtils.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -1 +1,4 @@
Rev
+Revision
+Date
+Id
Propchange: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:35:07 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id