Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 27085 invoked from network); 8 Dec 2005 01:17:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Dec 2005 01:17:51 -0000 Received: (qmail 55884 invoked by uid 500); 8 Dec 2005 01:17:50 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 55691 invoked by uid 500); 8 Dec 2005 01:17:48 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 55674 invoked by uid 99); 8 Dec 2005 01:17:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2005 17:17:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of elecharny@gmail.com designates 64.233.182.196 as permitted sender) Received: from [64.233.182.196] (HELO nproxy.gmail.com) (64.233.182.196) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2005 17:17:47 -0800 Received: by nproxy.gmail.com with SMTP id i2so140276nfe for ; Wed, 07 Dec 2005 17:17:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=tzIR3UKds6Z7kDOXvqfGyBRShvYN6ay/wZvmlCRbhPemebujdOfl0v0/LkhxmwKtDudO4A8KUEQ/FPJtGvYjshnQSF1TJ4oK67mfrQV0MNSQzwiAA1vmc3KS6CTXyInUDH1byhHPwGN++S4bVi+qGWx2RMp2psJZaNJi/6FvaIQ= Received: by 10.48.143.20 with SMTP id q20mr149646nfd; Wed, 07 Dec 2005 17:17:26 -0800 (PST) Received: from ?192.168.0.2? ( [82.66.216.176]) by mx.gmail.com with ESMTP id i1sm424281nfe.2005.12.07.17.17.25; Wed, 07 Dec 2005 17:17:26 -0800 (PST) Subject: Oids global access From: Emmanuel Lecharny To: Apache Directory Developers List In-Reply-To: <452648305.1133998571050.JavaMail.jira@ajax.apache.org> References: <452648305.1133998571050.JavaMail.jira@ajax.apache.org> Content-Type: text/plain Date: Thu, 08 Dec 2005 02:17:46 +0100 Message-Id: <1134004666.7846.136.camel@portable> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi all, I have a problem : I want to be able to access the Name <-> Oid Map, to be able to transform names to oid when parsing a DN (this is related to DIRLDAP-73 bug : http://issues.apache.org/jira/browse/DIRLDAP-73 ) What I want to do is simple : translating any DN to its counterpart using oid instead of names, like : ou=People, dc=example, dc=com will be transformed to : 2.5.4.11=People, 0.9.2342.19200300.100.1.25=example, 0.9.2342.19200300.100.1.25=com (I'm talking of the internal representation of the DN, not the User Provided DN, which will remain the same) To do that, I need to read the HashMap where is stored all the Name/Oid maps. It's currentrly stored in the oidRegistry. The problem is that this Map is not accessible directly. I think that the best place to do the translation is in DnParser, thus I need a static oidRegistry I can read from the parser. This is not something complicated to do, but I'm just asking myself : is there any better solution ? (Of course, rethinking the way DN are parsed/normalized is possible, but not for 1.0) I welcome any suggestion ! --Emmanuel