Re: SPI: usage of java.util.Properties in interfaces

2006-10-27 Thread Marcel Reutegger
I think both approaches have their disadvantages. Using a map requires casting to Strings (we currently have to stick with 1.4, I think) and Properties class exposes methods like store and load which are useless (or even dangerous). I propose we change the RepositoryService interface and use

Re: SPI: usage of java.util.Properties in interfaces

2006-10-27 Thread Julian Reschke
Marcel Reutegger schrieb: I think both approaches have their disadvantages. Using a map requires casting to Strings (we currently have to stick with 1.4, I think) and Properties class exposes methods like store and load which are useless (or even dangerous). Well, SPI already uses generic

Re: SPI: usage of java.util.Properties in interfaces

2006-10-27 Thread Julian Reschke
Jukka Zitting schrieb: Hi, On 10/27/06, Marcel Reutegger [EMAIL PROTECTED] wrote: I propose we change the RepositoryService interface and use the two descriptor methods defined in javax.jcr.Repository: getDescriptorKeys() and getDescriptor(). The implementation then can use whatever

Re: SPI: usage of java.util.Properties in interfaces

2006-10-27 Thread Marcel Reutegger
Julian Reschke wrote: Marcel Reutegger schrieb: I think both approaches have their disadvantages. Using a map requires casting to Strings (we currently have to stick with 1.4, I think) and Properties class exposes methods like store and load which are useless (or even dangerous). Well, SPI

Re: SPI: usage of java.util.Properties in interfaces

2006-10-27 Thread Tako Schotanus
The most logical difference would be that a Set tells you that the elements stored in it will be unique while a Collection might permit you to introduce duplicates. -Tako On 10/27/06, Marcel Reutegger [EMAIL PROTECTED] wrote: Julian Reschke wrote: Marcel Reutegger schrieb: I think both

Re: SPI: usage of java.util.Properties in interfaces

2006-10-27 Thread Marcel Reutegger
Jukka Zitting wrote: How about remote clients that would prefer to get all the descriptors in one call? hmm... good point. even though caching the descriptors would be trivial. I've just changed the relevant methods to use a Map instead of the Properties class. regards marcel

Re: SPI: usage of java.util.Properties in interfaces

2006-10-27 Thread Marcel Reutegger
Julian Reschke wrote: Marcel Reutegger schrieb: because we didn't see a need for a Set. a collection is IMO sufficient. what is the benefit of a Set over a Collection for a client? The client can rely on not having duplicates in it, The client can rely on it anyway because the documentation

SPI: usage of java.util.Properties in interfaces

2006-10-26 Thread Julian Reschke
Hi, here's a short question: is there a particular reason, why, for instance, RepositoryService.getRepositoryDescriptors() uses a result type of Properties? In theory, a Map should be sufficient, and would have the benefit of better support in the Collections framework (such as

Re: SPI: usage of java.util.Properties in interfaces

2006-10-26 Thread Angela Schreiber
ja... we discussed that before. the reason is, that repository descriptors are defined to be key-value String pairs and we wanted to make that clear. regards angela Julian Reschke wrote: Hi, here's a short question: is there a particular reason, why, for instance,

Re: SPI: usage of java.util.Properties in interfaces

2006-10-26 Thread Julian Reschke
Angela Schreiber schrieb: ja... we discussed that before. the reason is, that repository descriptors are defined to be key-value String pairs and we wanted to make that clear. Well, I really think that's a bad idea. Please reconsider it (keep in mind that JDK 1.5 will provide typing