You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2011/03/22 11:00:31 UTC

Some few classes to move out of model ?

Hi guys,

the ComplexDnParser, DnParser, FastDnParser, RdnParser  are classes 
currently present in model. I'm wondering if we should not move those 
classes out of model, or at least make them invisible ?

The parsers exist only because we had to implement the JNDI interface, 
and I'm not sure it makes sense anymore to expose them.

For instance, the DnPlaser class (well, it's not even a class, it's an 
enum, which sound very strange to me) is only used in teh DN class : 
could we make it a private class in Dn ?

NameComponentNormalizer is an interface I moved to schema/normalizer too.

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Some few classes to move out of model ?

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On 22 mars 2011, at 11:00, Emmanuel Lecharny wrote:

> Hi guys,

Hi Emmanuel,

> the ComplexDnParser, DnParser, FastDnParser, RdnParser  are classes currently present in model. I'm wondering if we should not move those classes out of model, or at least make them invisible ?

+1.
This reveals some of the internals of the API.
You're absolutely right.


> The parsers exist only because we had to implement the JNDI interface, and I'm not sure it makes sense anymore to expose them.
> 
> For instance, the DnPlaser class (well, it's not even a class, it's an enum, which sound very strange to me) is only used in teh DN class : could we make it a private class in Dn ?

+1.
We could also have them move to another package. A package that would not be exported in OSGI.


> NameComponentNormalizer is an interface I moved to schema/normalizer too.

Does this interface and its implementation class SimpleNameComponentNormalizer are meant to be public?

Regards,
Pierre-Arnaud

> 
> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
> 


Re: Some few classes to move out of model ?

Posted by Emmanuel Lécharny <el...@apache.org>.
On 3/22/11 11:15 PM, Stefan Seelmann wrote:
>
>> For instance, the DnPlaser class (well, it's not even a class, it's an enum,
>> which sound very strange to me)
> I just followed Joshua Bloch's "Effective Java(TM) Second Edition":
> Item 3: Enforce the singleton property with (...) an enum type.

Good idea.
> But
> now that the parsers are only used from the Dn/Rdn class that may not
> make sense anymore.
Well, I think it does make sense. I kept the enum around, I just changed 
the enum to be package protected.


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Some few classes to move out of model ?

Posted by Stefan Seelmann <se...@apache.org>.
On Tue, Mar 22, 2011 at 11:00 AM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Hi guys,
>
> the ComplexDnParser, DnParser, FastDnParser, RdnParser  are classes
> currently present in model. I'm wondering if we should not move those
> classes out of model, or at least make them invisible ?

+1

> For instance, the DnPlaser class (well, it's not even a class, it's an enum,
> which sound very strange to me)

I just followed Joshua Bloch's "Effective Java(TM) Second Edition":
Item 3: Enforce the singleton property with (...) an enum type. But
now that the parsers are only used from the Dn/Rdn class that may not
make sense anymore.

Kind Regards,
Stefan