Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 9280 invoked from network); 17 Dec 2010 15:32:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Dec 2010 15:32:14 -0000 Received: (qmail 6489 invoked by uid 500); 17 Dec 2010 15:32:14 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 6365 invoked by uid 500); 17 Dec 2010 15:32:14 -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 6350 invoked by uid 99); 17 Dec 2010 15:32:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Dec 2010 15:32:13 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of antoine@gmx.de designates 213.165.64.22 as permitted sender) Received: from [213.165.64.22] (HELO mail.gmx.net) (213.165.64.22) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 17 Dec 2010 15:32:06 +0000 Received: (qmail invoked by alias); 17 Dec 2010 15:31:43 -0000 Received: from unknown (EHLO [192.168.94.119]) [38.100.172.138] by mail.gmx.net (mp030) with SMTP; 17 Dec 2010 16:31:43 +0100 X-Authenticated: #22961642 X-Provags-ID: V01U2FsdGVkX19IfJBBChlIvEVZNLdHiiE7C/Z7dlVntj5DSST+4j TOwh83S+QbGIST Message-ID: <4D0B8246.3080200@gmx.de> Date: Fri, 17 Dec 2010 10:31:18 -0500 From: Antoine Levy-Lambert User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: svn commit: r1050378 - /directory/apacheds/trunk/server-config/src/main/resources/config.ldif References: <20101217133230.C1AD423889B1@eris.apache.org> <4D0B742C.4050002@gmx.de> <166B5536-DD04-4668-BD1B-FB54BC18BE50@marcelot.net> In-Reply-To: <166B5536-DD04-4668-BD1B-FB54BC18BE50@marcelot.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 Hello Pierre-Arnaud, On 12/17/2010 10:00 AM, Pierre-Arnaud Marcelot wrote: > Hi Antoine, > > I only added it for consistency with other entries in the configuration and for the following reason, mention by Emmanuel in the previous thread "Adding annotations to Configuration beans": > > Begin forwarded message: >> On 12/6/10 6:00 PM, Pierre-Arnaud Marcelot wrote: >>> On 6 d�c. 2010, at 17:32, Alex Karasulu wrote: >>>> Also as Kiran pointed out in his response, what if the contained elements are kept in a single attribute like this ads-compositeElement ? >>> AFAIR, the 'ads-compositeElement' was introduced as kind of "quick hack" to ease the work on the reader class. I really think we can get rid of it easily with the annotation system. >> ads-compositeElement has been created at the origin as a way to tell the reader that the element is a composite element. The reader was supposed to be completely generic, ie the java Beans could have been generated automatically (except that because it requires the development of a maven plugin, something I didn't want to do). >> >> Now that you have defined some @, sure this is redondant, but if someone decide to define a reader/writer in another language, then this element is probably necessary. > > That said, I 100% agree on the fact that this attribute is redundant and somehow unnecessary. > > I still think it should be removed for an easier (hand) writing of the configuration. > Also, looks like the ConfigReader does not need it in its current implementation, as all objects were perfectly instantiated before my fix on the file. > > Maybe it's time to take a community-wide decision about these types of attributes (attributes extending 'ads-compositeElement'). > There are two sorts of ads-compositeelements. Some are containers containing entries. Others are multi-valued attributes. I would see three possibilities 1) say that all container entries which are children of configuration elements imply automatically that they contain objects to be added to a list present in the containing element. For example finding a subordinate entry ou=flowers the ConfigPartitionReader would expect automatically to find flower entries readable with a configuration bean of the ads-type of the subordinate entries under ou=flowers. The "container" field in the ConfigurationElement annotation would not be required, we would just swallow automatically whatever containers are lying below each configuration entry, recursively the nice thing about this option is that it makes the least possible metadata to manage 2) create a new multi valued attribute type ads-container, and use the ads-container to list the subordinate entries to be read by the config partition reader. For instance ads-container could have two values flowers and vegetables, meaning that the config partition reader has to search explicitly for ou=flowers and ou=vegetables below the current entry. The nice thing is that it disentangles completely the case of attribute based composite elements compared to entry based composite elements 3) statu-quo. Disadvantage : unneeded redundant information is just confusing - > Regards, > Pierre-Arnaud > > On 17 d�c. 2010, at 15:31, Antoine Levy-Lambert wrote: > Antoine