directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r327693 - /directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/primitives/DNParser.java
Date Sat, 22 Oct 2005 20:47:50 GMT
Author: elecharny
Date: Sat Oct 22 13:47:45 2005
New Revision: 327693

URL: http://svn.apache.org/viewcvs?rev=327693&view=rev
Log:
Added a parse method which take a String as parameter and return a LdapDN

Modified:
    directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/primitives/DNParser.java

Modified: directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/primitives/DNParser.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/primitives/DNParser.java?rev=327693&r1=327692&r2=327693&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/primitives/DNParser.java
(original)
+++ directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/primitives/DNParser.java
Sat Oct 22 13:47:45 2005
@@ -97,4 +97,15 @@
             throw new InvalidNameException( "Bad DN : " + new String( chars ) );
         }
     }
+
+    /**
+     * Parse a String and return a LdapDN if the String is a valid DN
+     * @param dn The DN to parse
+     * @return A LdapDN
+     * @throws InvalidNameException If the String is not a valid DN
+     */
+    public static LdapDN parse( String dn ) throws InvalidNameException
+    {
+        return new LdapDN( dn );
+    }
 }



Mime
View raw message