directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrique Rodriguez" <>
Subject Re: DNS : RecordStore
Date Thu, 14 Jun 2007 00:35:32 GMT
On 6/13/07, Julien Vermillard <> wrote:
> Please forget my last message, I pressed send too quicly :)
> After a little digging in
> ResourceRecordImpl you have :
>     public String get( String id )
>     {
>         return ( String ) attributes.get( id.toLowerCase() );
>     }
> Which return null for my address, due to the "toLowerCase()".
> Am I supposed to build my Attribute Set using .toLowerCase() for keys ?
> Like : attr.put(DnsAttribute.IP_ADDRESS.toLowerCase(),"");

That will do it, but the intention is for you to use the
ResourceRecordModifier to create ResourceRecords.  The
ResourceRecordImpl should be packaged-scoped or something - my bad.
If you look at ResourceRecordModifier#put the id is toLowerCase()'d
such that when retrieved with 'get' it works.  IIRC, this was to deal
with some issues with the case of attributes being returned by our
Directory store implementation.

You can re-write your code to instantiate a ResourceRecordModifier.
Then call sets/puts on the modifier and when you are done call
getEntry to get a ResourceRecord.  That will handle the needed


View raw message