directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francois <fan...@gmail.com>
Subject Re: [DN] Existing API review
Date Wed, 13 Jan 2010 12:03:51 GMT
Le 13/01/2010 12:24, Matthew Swift a écrit :
> Hi Emmanuel,

I'm just giveng my point of view about the following, I don't think I 
can be relevant elsewhere:

> Also, I strongly believe that DNs and RDNs and AVAs should be immutable
> objects (as well as any other low level API type). What do you think?

I will go further : DN, RDN and AVA should be immutable, but Attribute 
should be immutable too, and Entry should have at least an immutable DN 
(and facilities to copy an entry with a new DN or ParentDN at factory 
level).

For attribute, the rationnal is that one replace attribute by a new one 
most of the time, and it's much easier to deal with immutable attribute 
- that's one of the aspect of UnboundId SDK that I prefer.

For Entry's DN, it's linked to the fact that DN are almost IDs for 
entries. So, the semantic of such an operation is much likely in two cases:
- create a copy of an entry with another DN (change RDN but perhaps not 
parentDN)
- move an entry (only the parent DN change).
These two cases (I hope I don't forget other ones) are easily fulfilled 
througth factory-like method support.


-- 
Francois ARMAND
http://fanf42.blogspot.com


Mime
View raw message